Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/18106#discussion_r123827347
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
@@ -2067,6 +2067,18 @@ object functions {
*/
def radians(columnName: String): Column = radians(Column(columnName))
+ /**
+ * returns number truncated by specified decimal places.
+ *
+ * @param scale: 4. -4, 0
+ *
+ * @group math_funcs
+ * @since 2.3.0
+ */
+ def trunc(db: Column, scale: Int = 0): Column = withExpr {
--- End diff --
I would avoid using default value here unless we are very sure on this
(e.g., other languages can call this without any problem, this guarantees
method signature and does not break binary compatibility and etc.).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]