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

yangjie01 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 bab6988cb4f9 [SPARK-51897][SQL] Fix compilation warnings related to 
"The auto insertion will be deprecated, please write `TimeType.apply` 
explicitly"
bab6988cb4f9 is described below

commit bab6988cb4f9710182aff0657d7bd90d74f73375
Author: yangjie01 <yangji...@baidu.com>
AuthorDate: Thu Apr 24 19:21:41 2025 +0800

    [SPARK-51897][SQL] Fix compilation warnings related to "The auto insertion 
will be deprecated, please write `TimeType.apply` explicitly"
    
    ### What changes were proposed in this pull request?
    This pr aims to fix the following compilation warnings related to "The auto 
insertion will be deprecated, please write `TimeType.apply` explicitly":
    
    ```
    [WARNING] [Warn] 
/Users/yangjie01/SourceCode/git/spark-maven/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala:210:
 The method `apply` is inserted. The auto insertion will be deprecated, please 
write `TimeType.apply` explicitly.
    Applicable -Wconf / nowarn filters for this warning: msg=<part of the 
message>, cat=deprecation, 
site=org.apache.spark.sql.catalyst.expressions.MinutesOfTime.inputTypes, 
origin=org.apache.spark.sql.types.TimeType, version=2.13.13
    [WARNING] [Warn] 
/Users/yangjie01/SourceCode/git/spark-maven/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala:270:
 The method `apply` is inserted. The auto insertion will be deprecated, please 
write `TimeType.apply` explicitly.
    Applicable -Wconf / nowarn filters for this warning: msg=<part of the 
message>, cat=deprecation, 
site=org.apache.spark.sql.catalyst.expressions.HoursOfTime.inputTypes, 
origin=org.apache.spark.sql.types.TimeType, version=2.13.13
    [WARNING] [Warn] 
/Users/yangjie01/SourceCode/git/spark-maven/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala:354:
 The method `apply` is inserted. The auto insertion will be deprecated, please 
write `TimeType.apply` explicitly.
    Applicable -Wconf / nowarn filters for this warning: msg=<part of the 
message>, cat=deprecation, 
site=org.apache.spark.sql.catalyst.expressions.SecondsOfTime.inputTypes, 
origin=org.apache.spark.sql.types.TimeType, version=2.13.13
    ```
    
    ### Why are the changes needed?
    Avoid using `auto insertion`, as it will be deprecated.
    
    ### Does this PR introduce _any_ user-facing change?
    No
    
    ### How was this patch tested?
    - Pass GitHub Acitons
    
    ### Was this patch authored or co-authored using generative AI tooling?
    No
    
    Closes #50692 from LuciferYang/fix-auto-insertion.
    
    Authored-by: yangjie01 <yangji...@baidu.com>
    Signed-off-by: yangjie01 <yangji...@baidu.com>
---
 .../org/apache/spark/sql/catalyst/expressions/timeExpressions.scala | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala
 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala
index 9f584875914c..0f9405f43634 100644
--- 
a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala
+++ 
b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/timeExpressions.scala
@@ -207,7 +207,7 @@ case class MinutesOfTime(child: Expression)
   )
 
   override def inputTypes: Seq[AbstractDataType] =
-    Seq(TypeCollection(TimeType.MIN_PRECISION to TimeType.MAX_PRECISION map 
TimeType: _*))
+    Seq(TypeCollection(TimeType.MIN_PRECISION to TimeType.MAX_PRECISION map 
TimeType.apply: _*))
 
   override def children: Seq[Expression] = Seq(child)
 
@@ -267,7 +267,7 @@ case class HoursOfTime(child: Expression)
   )
 
   override def inputTypes: Seq[AbstractDataType] =
-    Seq(TypeCollection(TimeType.MIN_PRECISION to TimeType.MAX_PRECISION map 
TimeType: _*))
+    Seq(TypeCollection(TimeType.MIN_PRECISION to TimeType.MAX_PRECISION map 
TimeType.apply: _*))
 
   override def children: Seq[Expression] = Seq(child)
 
@@ -351,7 +351,7 @@ case class SecondsOfTime(child: Expression)
   )
 
   override def inputTypes: Seq[AbstractDataType] =
-    Seq(TypeCollection(TimeType.MIN_PRECISION to TimeType.MAX_PRECISION map 
TimeType: _*))
+    Seq(TypeCollection(TimeType.MIN_PRECISION to TimeType.MAX_PRECISION map 
TimeType.apply: _*))
 
   override def children: Seq[Expression] = Seq(child)
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to