jintaoguan commented on a change in pull request #3985:
URL: https://github.com/apache/hudi/pull/3985#discussion_r803325113



##########
File path: 
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/IncrementalRelation.scala
##########
@@ -168,7 +169,17 @@ class IncrementalRelation(val sqlContext: SQLContext,
       } else {
         log.info("Additional Filters to be applied to incremental source are 
:" + filters.mkString("Array(", ", ", ")"))
 
-        var df: DataFrame = 
sqlContext.createDataFrame(sqlContext.sparkContext.emptyRDD[Row], usedSchema)
+        var prunedSchema = StructType(Seq())
+        if 
(!requiredColumns.contains(HoodieRecord.COMMIT_TIME_METADATA_FIELD)) {

Review comment:
       Ack.

##########
File path: 
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/IncrementalRelation.scala
##########
@@ -225,6 +236,9 @@ class IncrementalRelation(val sqlContext: SQLContext,
           }
         }
 
+        if 
(!requiredColumns.contains(HoodieRecord.COMMIT_TIME_METADATA_FIELD)) {

Review comment:
       Ack.




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to