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

gurwls223 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 ea0cd0151a26 [SPARK-39627][SQL][FOLLOWUP] Cleanup deprecated api usage 
related to `JdbcDialect.compileAggregate`
ea0cd0151a26 is described below

commit ea0cd0151a263893d6c2043b3261f283f50721dc
Author: Wei Guo <[email protected]>
AuthorDate: Thu Jun 27 11:01:51 2024 +0900

    [SPARK-39627][SQL][FOLLOWUP] Cleanup deprecated api usage related to 
`JdbcDialect.compileAggregate`
    
    ### What changes were proposed in this pull request?
    
    This PR aims to cleanup deprecated api usage related to 
`JdbcDialect.compileAggregate`, and unified to `JdbcDialect.compileExpression`
    
    The only one left call is in `JDBCScanBuilder.pushAggregation`.
    
    ### Why are the changes needed?
    
    Cleanup deprecated api.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Pass GA.
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No.
    
    Closes #47070 from wayneguow/JDBCScanBuilder.
    
    Authored-by: Wei Guo <[email protected]>
    Signed-off-by: Hyukjin Kwon <[email protected]>
---
 .../spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala
 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala
index dc834893db21..230f30fb1d06 100644
--- 
a/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala
+++ 
b/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala
@@ -89,7 +89,7 @@ case class JDBCScanBuilder(
   override def pushAggregation(aggregation: Aggregation): Boolean = {
     if (!jdbcOptions.pushDownAggregate) return false
 
-    val compiledAggs = 
aggregation.aggregateExpressions.flatMap(dialect.compileAggregate)
+    val compiledAggs = 
aggregation.aggregateExpressions.flatMap(dialect.compileExpression)
     if (compiledAggs.length != aggregation.aggregateExpressions.length) return 
false
 
     val compiledGroupBys = 
aggregation.groupByExpressions.flatMap(dialect.compileExpression)


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

Reply via email to