Skip to content

Commit

Permalink
feat: [-] delete round no args due to ambiguity
Browse files Browse the repository at this point in the history
  • Loading branch information
eruizalo committed Aug 12, 2023
1 parent 1f144e7 commit ac5a787
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
9 changes: 0 additions & 9 deletions core/src/main/scala/doric/syntax/NumericColumns.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
}
Expand Down

0 comments on commit ac5a787

Please sign in to comment.