yihua commented on code in PR #13503:
URL: https://github.com/apache/hudi/pull/13503#discussion_r2233063416


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/FileFormatUtilsForFileGroupReader.scala:
##########
@@ -124,4 +124,11 @@ object FileFormatUtilsForFileGroupReader extends 
SparkAdapterSupport {
       plan
     }
   }
+
+  def createStreamingDataFrame(sqlContext: SQLContext, relation: 
HadoopFsRelation, requiredSchema: StructType): DataFrame = {
+    val logRel = LogicalRelation(relation, isStreaming = true)
+    val resolvedSchema = logRel.resolve(requiredSchema, 
sqlContext.sparkSession.sessionState.analyzer.resolver)
+    Dataset.ofRows(sqlContext.sparkSession, applyFiltersToPlan(logRel, 
requiredSchema, resolvedSchema,
+      relation.fileFormat.asInstanceOf[HoodieFormatTrait].getRequiredFilters))

Review Comment:
   It's counter-intuitive that the `relation` contains the filter but it's not 
applied.



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