LuciferYang commented on code in PR #51046:
URL: https://github.com/apache/spark/pull/51046#discussion_r2124296271
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/V2ScanRelationPushDown.scala:
##########
@@ -38,7 +39,30 @@ import org.apache.spark.sql.types.{DataType, DecimalType,
IntegerType, StructTyp
import org.apache.spark.sql.util.SchemaUtils._
import org.apache.spark.util.ArrayImplicits._
+object PostV2ScanRelationPushDown extends Rule[LogicalPlan] with
PredicateHelper {
+ import V2ScanRelationPushDown._
+
+ def apply(plan: LogicalPlan): LogicalPlan = {
+ val pushdownRules = Seq[LogicalPlan => LogicalPlan] (
+ createScanBuilder,
+ pruneColumns)
+
+ pushdownRules.foldLeft(plan) { (newPlan, pushDownRule) =>
+ pushDownRule(newPlan)
+ }
+ }
+
+ private def createScanBuilder(plan: LogicalPlan) = plan.transform {
+ case r @ DataSourceV2ScanRelation(relation, _, _, _, _)
+ if relation.getTagValue(V2_SCAN_BUILDER_HOLDER).nonEmpty =>
Review Comment:
When will the content of tags be removed?
--
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]