hudi-agent commented on code in PR #20183:
URL: https://github.com/apache/hudi/pull/20183#discussion_r4152860611


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedFileFormat.scala:
##########
@@ -346,10 +337,11 @@ class HoodieFileGroupReaderBasedFileFormat(tablePath: 
String,
     val dataStructTypeWithMandatoryPartitionFields = 
StructType(dataStructType.fields ++ partitionSchema.fields.filter(f => 
mandatoryFields.contains(f.name) && !isNestedPartitionField(f.name)))
     val dataSchema = HoodieSchemaUtils.pruneDataSchema(schema, 
HoodieSchemaConversionUtils.convertStructTypeToHoodieSchema(dataStructTypeWithMandatoryPartitionFields,
 sanitizedTableName), exclusionFields)
 
-    
spark.sessionState.conf.setConfString("spark.sql.parquet.enableVectorizedReader",
 supportVectorizedRead.toString)
+    // Decide per scan: Spark skips supportBatch for scans wider than 
spark.sql.codegen.maxFields
+    val vectorizedRead = canReadVectorized(spark, outputSchema)

Review Comment:
   🤖 `canReadVectorized` throws `HoodieNotSupportedException` for any format 
other than PARQUET/ORC/LANCE, so calling it here makes every Vortex scan fail. 
Before, only narrow scans hit it through `supportBatch`. `buildBaseFileReader` 
already has a Vortex branch. Could the fallback return `false` for unknown or 
row-only formats instead of throwing?
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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