malinjawi commented on code in PR #12131: URL: https://github.com/apache/gluten/pull/12131#discussion_r3321094338
########## backends-velox/src-delta33/main/scala/org/apache/spark/sql/delta/stats/PrepareDeltaScan.scala: ########## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.spark.sql.delta.stats + +import org.apache.spark.sql.SparkSession +import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, V2WriteCommand} +import org.apache.spark.sql.catalyst.rules.Rule +import org.apache.spark.sql.delta.{DeltaTable, OptimisticTransaction, PreprocessTableWithDVs} +import org.apache.spark.sql.delta.sources.DeltaSQLConf + +/** Shadow Delta's PrepareDeltaScan to inject backend-specific DV preprocessing. */ +class PrepareDeltaScan(protected val spark: SparkSession) Review Comment: Yes, the earlier version did replace/shadow Delta’s `PrepareDeltaScan`, and I agree we should avoid that in production. I removed that approach. The current version no longer defines `org.apache.spark.sql.delta.stats.PrepareDeltaScan`; it uses a Gluten-scoped rule under `org.apache.gluten.extension` instead. I also checked the [PoC](https://github.com/apache/gluten/pull/10740) direction. The intent is the same: expose the DV metadata needed for native handoff without replacing Delta classes. After the Spark 3.5 CI feedback, I narrowed the rule further so it only rewrites eligible DV scans and leaves unpinned `TahoeLogFileIndex` / subquery-shaped plans untouched. -- 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]
