felipepessoto commented on code in PR #13666: URL: https://github.com/apache/gluten/pull/13666#discussion_r4653643788
########## docs/backends/velox/get-started/VeloxDelta.md: ########## @@ -336,7 +336,7 @@ The Read column covers Spark 3.5 to 4.2. It covers Spark 3.4 only where the row | Deletion vectors | Offload, Fallback on Spark 3.4 | PartialOffload | Gluten's tests check the results of deletion vector DELETE and MERGE on Spark 3.5 and 4.0 with native write turned on. Delta writes the deletion vector files, and MERGE writes its data files with Delta's writer (see [Write commands](#write-commands)). Both are from code. See [Deletion vectors](#deletion-vectors). | | Change data feed | Offload, also on Spark 3.4. Ranges with deletion vectors fall back. On Spark 3.4, scans of `_change_data` files also fall back when the table allows deletion vectors (from code). | Offload | UPDATE and DELETE write the `_change_data` files with Velox (from code). Change data feed reads of their changes are correct (seen on 4.1). See [Change data feed](#change-data-feed). | | Column mapping, name mode | Offload, also on Spark 3.4 | ResultMismatch on Spark 3.5, Fallback on Spark 4.x | On Spark 3.5, natively written files have no Parquet field IDs. Spark 4.x sends these writes to Delta's writer. Both are from code. See [Write problems](#write-problems). | -| Column mapping, id mode | Offload, also on Spark 3.4. ResultMismatch when matching by field ID would select no column (seen on 4.1) or a different column (from code). | ResultMismatch on Spark 3.5, Exception when Spark's reader reads the files. Fallback on Spark 4.x. Both are from code. | Gluten matches columns by physical name. See [Known problems](#known-problems). | +| Column mapping, id mode | Fallback, including Spark 3.4 | ResultMismatch on Spark 3.5, Exception when Spark's reader reads the files. Fallback on Spark 4.x. Both are from code. | Spark matches columns by Parquet field ID. Native field-ID reads remain unsupported ([#12241](https://github.com/apache/gluten/issues/12241)). See [Write problems](#write-problems) for files written without IDs. | Review Comment: Confirmed from the Spark 3.5 writer and reader code. Updated the feature row and Write problems to state that these files now fail through Spark even with Gluten enabled. The docs recommend keeping native Delta writes off for id-mode tables to avoid creating more affected files, and explicitly note that this does not repair existing files. The separate writer fallback remains tracked in #13383. Also corrected `parquetUseColumnNames`: it cannot override id-mode fallback; name-mode tables still use physical names, and unmapped native scans use the configured name/position matching. Aligned the rename/drop rows too. Pushed in af7bf7326; the Spark 3.5 compatibility warning is based on source inspection, not a new runtime reproduction. ########## gluten-ut/spark35/src-delta/test/scala/org/apache/spark/sql/delta/GlutenDeltaColumnMappingSuite.scala: ########## @@ -0,0 +1,114 @@ +/* + * 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 + +import org.apache.gluten.config.GlutenConfig +import org.apache.gluten.execution.DeltaScanTransformer +import org.apache.gluten.utils.BackendTestUtils + +import org.apache.spark.SparkConf +import org.apache.spark.sql.{GlutenQueryTest, Row} +import org.apache.spark.sql.catalyst.TableIdentifier +import org.apache.spark.sql.execution.FileSourceScanExec +import org.apache.spark.sql.test.SharedSparkSession +import org.apache.spark.sql.types.{MetadataBuilder, StructType} + +class GlutenDeltaColumnMappingSuite extends GlutenQueryTest with SharedSparkSession { Review Comment: You're right—the suite was compiled but excluded by the filters. Added `org.apache.spark.sql.delta.GlutenDeltaColumnMappingSuite` next to `GlutenDeltaStats` in group 3 for Spark 3.5 (Scala 2.12 and 2.13) and Spark 4.0/4.1/4.2, which reuse the same Delta test sources. Pushed in af7bf7326. Checked that the suite was unselected before and is now selected only in group 3 in all five jobs, with the existing filters preserved. The actual suite execution is left to the fresh CI run. -- 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]
