diff --git a/src/main/java/com/snowflake/snowpark_java/Functions.java b/src/main/java/com/snowflake/snowpark_java/Functions.java index 00725cd0..0515164a 100644 --- a/src/main/java/com/snowflake/snowpark_java/Functions.java +++ b/src/main/java/com/snowflake/snowpark_java/Functions.java @@ -197,8 +197,7 @@ public static Column count(Column col) { public static Column countDistinct(String first, String... remaining) { return new Column( com.snowflake.snowpark.functions.countDistinct( - first, - remaining)); + first, JavaUtils.stringArrayToStringSeq(remaining))); } /** diff --git a/src/main/scala/com/snowflake/snowpark/functions.scala b/src/main/scala/com/snowflake/snowpark/functions.scala index 07f029b4..0f48d01f 100644 --- a/src/main/scala/com/snowflake/snowpark/functions.scala +++ b/src/main/scala/com/snowflake/snowpark/functions.scala @@ -218,7 +218,7 @@ object functions { * @since 1.13.0 */ def countDistinct(colName: String, colNames: String*): Column = - count_distinct(col(colName), colNames.map(Column.apply) : _*) + count_distinct(col(colName), colNames.map(Column.apply): _*) /** * Returns either the number of non-NULL distinct records for the specified columns, @@ -228,7 +228,7 @@ object functions { * @since 1.13.0 */ def countDistinct(expr: Column, exprs: Column*): Column = - count_distinct(expr, exprs) + count_distinct(expr, exprs: _*) /** * Returns either the number of non-NULL distinct records for the specified columns,