malinjawi commented on code in PR #13666: URL: https://github.com/apache/gluten/pull/13666#discussion_r4653358130
########## 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: On 3.5 with native write on, the Velox writer doesn't write field IDs for id-mode tables (#13383 adds the fallback). Those files read fine through Gluten before, now they should fail in Spark's reader. Haven't run it though. Worth a line here? The Write problems and `parquetUseColumnNames` rows are stale after this too. ########## 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: This suite isn't picked up by CI yet, the spark-test groups only match `org.apache.spark.sql.delta.GlutenDeltaStats` from this package. Mind adding `org.apache.spark.sql.delta.GlutenDeltaColumnMapping` to group 3? -- 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]
