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


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/execution/datasources/parquet/HoodieFileGroupReaderBasedFileFormat.scala:
##########
@@ -184,23 +183,31 @@ class HoodieFileGroupReaderBasedFileFormat(tablePath: 
String,
   override def vectorTypes(requiredSchema: StructType,
                            partitionSchema: StructType,
                            sqlConf: SQLConf): Option[Seq[String]] = {
-    val originalVectorTypes = super.vectorTypes(requiredSchema, 
partitionSchema, sqlConf)
-    if (mandatoryFields.isEmpty) {
-      originalVectorTypes
+    if (hoodieFileFormat == HoodieFileFormat.LANCE && 
!isMultipleBaseFileFormatsEnabled) {

Review Comment:
   Applied the `mandatoryFields` adjustment for the Lance branch — same pattern 
as Parquet/ORC, using `LanceArrowColumnVector` for mandatory partition columns 
that are read from the file. For the current COW-only scope `mandatoryFields` 
is typically empty, but this ensures correctness if the scope expands.



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