cloud-fan commented on a change in pull request #33352:
URL: https://github.com/apache/spark/pull/33352#discussion_r673993403
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCScanBuilder.scala
##########
@@ -49,6 +51,58 @@ case class JDBCScanBuilder(
override def pushedFilters(): Array[Filter] = pushedFilter
+ private var pushedAggregations = Option.empty[Aggregation]
+
+ private var pushedAggregateColumn: Array[String] = Array()
+
+ private def getStructFieldForCol(col: FieldReference): StructField =
+ schema.fields(schema.fieldNames.toList.indexOf(col.fieldNames.head))
+
+ override def pushAggregation(aggregation: Aggregation): Boolean = {
+ if (!jdbcOptions.pushDownAggregate) return false
+
+ val dialect = JdbcDialects.get(jdbcOptions.url)
+ val compiledAgg =
JDBCRDD.compileAggregates(aggregation.getAggregateExpressions, dialect)
+
+ var pushedSchema = new StructType()
Review comment:
`outputSchema` is a better name
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]