xiarixiaoyao commented on code in PR #5343:
URL: https://github.com/apache/hudi/pull/5343#discussion_r851966494


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/BaseFileOnlyRelation.scala:
##########
@@ -101,4 +102,17 @@ class BaseFileOnlyRelation(sqlContext: SQLContext,
 
     sparkAdapter.getFilePartitions(sparkSession, fileSplits, 
maxSplitBytes).map(HoodieBaseFileSplit.apply)
   }
+
+  def toHadoopFsRelation: HadoopFsRelation = {
+    HadoopFsRelation(
+      fileIndex,
+      fileIndex.partitionSchema,
+      fileIndex.dataSchema,
+      bucketSpec = None,
+      fileFormat = metaClient.getTableConfig.getBaseFileFormat match {
+        case HoodieFileFormat.PARQUET => new ParquetFileFormat
+        case HoodieFileFormat.ORC => new OrcFileFormat
+      },
+      optParams)(sparkSession)

Review Comment:
   maybe we need HoodieFileIndex or  HoodieROTablePathFilter to filter old 
parquet file.
   how about fallabck to the implement of 0.10.0     
https://github.com/apache/hudi/blob/cc3896be2a023f8819883d745178503286ac2ab1/hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/hudi/DefaultSource.scala#L182



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