malinjawi commented on code in PR #12218: URL: https://github.com/apache/gluten/pull/12218#discussion_r3371735979
########## gluten-delta/src-delta40/main/scala/org/apache/gluten/extension/DeltaCDFRelationHelper.scala: ########## @@ -0,0 +1,47 @@ +/* + * 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.gluten.extension + +import org.apache.spark.sql.{DataFrame, SparkSession} +import org.apache.spark.sql.delta.BatchCDFSchemaEndVersion +import org.apache.spark.sql.delta.commands.cdc.CDCReader + +object DeltaCDFRelationHelper { Review Comment: Yes @felipepessoto I checked the current Maven profile/source wiring: - `spark-4.0` sets `delta.version=4.0.1` and `delta.binary.version=40` - `spark-4.1` sets `delta.version=4.1.0` and `delta.binary.version=40` - the Delta profile adds sources from `src-delta${delta.binary.version}/main/scala` So with the current profile setup, both Spark 4.0 / Delta 4.0.x and Spark 4.1 / Delta 4.1.x use `gluten-delta/src-delta40/...`. For future Delta 4.2 / 4.3 support, it depends on how those profiles are introduced. If they keep `delta.binary.version=40`, they will continue to use the same `src-delta40` helper. If Delta changes the relevant CDF APIs and Gluten introduces a new binary bucket, then we should add a new version-specific helper. This also relates to the earlier folder-activation discussion in #11924: supporting family-level folders like `src-spark4` / `src-delta4` would make this cleaner and avoid copying code across Spark/Delta 4.x profiles when the APIs stay compatible. I think that belongs in a separate Maven/source-layout refactor rather than in this CDF PR. -- 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]
