wombatu-kun commented on code in PR #19133:
URL: https://github.com/apache/hudi/pull/19133#discussion_r3564126694


##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestLegacyParquetReadPath.scala:
##########
@@ -0,0 +1,261 @@
+/*
+ * 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.hudi.functional
+
+import org.apache.hudi.{BaseFileOnlyRelation, DataSourceReadOptions, 
DataSourceWriteOptions, IncrementalRelationV1, IncrementalRelationV2}
+import org.apache.hudi.common.config.HoodieReaderConfig
+import org.apache.hudi.common.table.HoodieTableConfig
+import org.apache.hudi.common.table.log.InstantRange.RangeType
+import org.apache.hudi.config.HoodieWriteConfig
+import org.apache.hudi.testutils.HoodieSparkClientTestBase
+
+import org.apache.spark.sql.{DataFrame, Row, SaveMode, SparkSession}
+import org.apache.spark.sql.functions.col
+import org.junit.jupiter.api.{AfterEach, BeforeEach, Test}
+import org.junit.jupiter.api.Assertions.{assertEquals, assertTrue}
+
+/** Row shape written by these tests. A nested struct and an array are 
included so the legacy
+ * parquet read path is exercised on complex types -- the historically fragile 
vectorized
+ * nested-column branch (e.g. HUDI-7190), not just flat scalar columns. */

Review Comment:
   On the spark3.3 profile these columns switch vectorization off rather than 
on. None of the SparkXXLegacyHoodieParquetFileFormat shims override 
`supportBatch` any more (HUDI-7190 removed the AtomicType-only override), so 
they inherit Spark's, which gates struct/array support on 
`spark.sql.parquet.enableNestedColumnVectorizedReader`. That config defaults to 
false in Spark 3.3 and true only from 3.4 on, so with `nested`/`tags` in the 
schema `supportBatch` returns false on 3.3, `enableVectorizedReader` is false, 
and the read falls back to parquet-mr. The vectorized nested-column branch that 
HUDI-7190 fixed for spark33 stays uncovered, 
`testCowSnapshotReadEqualsFileGroupReader` and 
`testCowSnapshotReadWithoutVectorizedReader` collapse onto the same row-based 
path there, and the flat-scalar schema that preceded this commit did vectorize 
on 3.3 - so this is a net coverage loss on that leg. The suite does run there: 
`test-spark-java-tests-part1` in bot.yml runs `-Punit-tests` over `hudi-s
 park` on spark3.3.
   
   Set `spark.sql.parquet.enableNestedColumnVectorizedReader=true` for the 
vectorized cases so the branch is exercised on every profile, and consider 
asserting that the format reports `supportBatch` true there, so a change of 
Spark's default cannot silently drop the coverage again.



-- 
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]

Reply via email to