From ac5a787bb705515c5e429b3cd2ce096ae5f1904e Mon Sep 17 00:00:00 2001 From: Eduardo Ruiz Date: Sun, 13 Aug 2023 01:34:32 +0200 Subject: [PATCH] feat: [-] delete round no args due to ambiguity --- core/src/main/scala/doric/syntax/NumericColumns.scala | 9 --------- .../test/scala/doric/syntax/NumericOperationsSpec.scala | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/core/src/main/scala/doric/syntax/NumericColumns.scala b/core/src/main/scala/doric/syntax/NumericColumns.scala index 576f90afb..47065da65 100644 --- a/core/src/main/scala/doric/syntax/NumericColumns.scala +++ b/core/src/main/scala/doric/syntax/NumericColumns.scala @@ -576,15 +576,6 @@ protected trait NumericColumns { */ def floor: LongColumn = column.elem.map(f.floor).toDC - /** - * Returns the value of the column e rounded to 0 decimal places with HALF_UP round mode - * - * @todo decimal type - * @group Numeric Type - * @see [[org.apache.spark.sql.functions.round(e:org\.apache\.spark\.sql\.Column)* org.apache.spark.sql.functions.round]] - */ - def round: DoricColumn[T] = column.elem.map(f.round).toDC - /** * Round the value to `scale` decimal places with HALF_UP round mode * if `scale` is greater than or equal to 0 or at integral part when `scale` is less than 0. diff --git a/core/src/test/scala/doric/syntax/NumericOperationsSpec.scala b/core/src/test/scala/doric/syntax/NumericOperationsSpec.scala index c49798aa8..790a38312 100644 --- a/core/src/test/scala/doric/syntax/NumericOperationsSpec.scala +++ b/core/src/test/scala/doric/syntax/NumericOperationsSpec.scala @@ -531,7 +531,7 @@ trait NumericOperationsSpec testDoricSparkDecimals[T, T]( List(Some(-1.4f), Some(0.7f), Some(1.0f), None), List(Some(-1.0f), Some(1.0f), Some(1.0f), None), - _.round, + _.round(0.lit), f.round ) }