This is an automated email from the ASF dual-hosted git repository.

yao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 1ba759feb784 [SPARK-51157][SQL] Add missing @varargs Scala annotation 
for Scala function APIs
1ba759feb784 is described below

commit 1ba759feb7849d847be79de972383097c0d3f28b
Author: Kent Yao <[email protected]>
AuthorDate: Tue Feb 11 17:16:37 2025 +0800

    [SPARK-51157][SQL] Add missing @varargs Scala annotation for Scala function 
APIs
    
    ### What changes were proposed in this pull request?
    This PR adds missing `varargs` Scala annotation for Scala function APIs
    
    ### Why are the changes needed?
    
    To instruct the compiler to generate java varargs-style forwarder methods 
for interop
    
    ### Does this PR introduce _any_ user-facing change?
    
    No, do not change the current behavior.
    
    ### How was this patch tested?
    
    w/o `varargs`:
    
![image](https://github.com/user-attachments/assets/6c9b212f-6db5-429e-80cb-c48bb213ee9d)
    
    ### Was this patch authored or co-authored using generative AI tooling?
    no
    
    Closes #49883 from yaooqinn/SPARK-51157.
    
    Authored-by: Kent Yao <[email protected]>
    Signed-off-by: Kent Yao <[email protected]>
---
 sql/api/src/main/scala/org/apache/spark/sql/functions.scala | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sql/api/src/main/scala/org/apache/spark/sql/functions.scala 
b/sql/api/src/main/scala/org/apache/spark/sql/functions.scala
index ffa3a03e4224..90c50cb53f5d 100644
--- a/sql/api/src/main/scala/org/apache/spark/sql/functions.scala
+++ b/sql/api/src/main/scala/org/apache/spark/sql/functions.scala
@@ -631,6 +631,7 @@ object functions {
    * @group agg_funcs
    * @since 2.0.0
    */
+  @scala.annotation.varargs
   def grouping_id(cols: Column*): Column = Column.fn("grouping_id", cols: _*)
 
   /**
@@ -646,6 +647,7 @@ object functions {
    * @group agg_funcs
    * @since 2.0.0
    */
+  @scala.annotation.varargs
   def grouping_id(colName: String, colNames: String*): Column = {
     grouping_id((Seq(colName) ++ colNames).map(n => Column(n)): _*)
   }
@@ -1742,6 +1744,7 @@ object functions {
    * @group struct_funcs
    * @since 3.5.0
    */
+  @scala.annotation.varargs
   def named_struct(cols: Column*): Column = Column.fn("named_struct", cols: _*)
 
   /**
@@ -3784,6 +3787,7 @@ object functions {
    * @group misc_funcs
    * @since 3.5.0
    */
+  @scala.annotation.varargs
   def reflect(cols: Column*): Column = Column.fn("reflect", cols: _*)
 
   /**
@@ -3792,6 +3796,7 @@ object functions {
    * @group misc_funcs
    * @since 3.5.0
    */
+  @scala.annotation.varargs
   def java_method(cols: Column*): Column = Column.fn("java_method", cols: _*)
 
   /**
@@ -3801,6 +3806,7 @@ object functions {
    * @group misc_funcs
    * @since 4.0.0
    */
+  @scala.annotation.varargs
   def try_reflect(cols: Column*): Column = Column.fn("try_reflect", cols: _*)
 
   /**
@@ -3827,6 +3833,7 @@ object functions {
    * @group generator_funcs
    * @since 3.5.0
    */
+  @scala.annotation.varargs
   def stack(cols: Column*): Column = Column.fn("stack", cols: _*)
 
   /**
@@ -4818,6 +4825,7 @@ object functions {
    * @group string_funcs
    * @since 3.5.0
    */
+  @scala.annotation.varargs
   def printf(format: Column, arguments: Column*): Column =
     Column.fn("printf", (format +: arguments): _*)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to