You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/10/03 14:04:49 UTC

[GitHub] [hudi] lw309637554 commented on a change in pull request #2125: [HUDI-1301] use spark INCREMENTAL mode query hudi dataset support sch…

lw309637554 commented on a change in pull request #2125:
URL: https://github.com/apache/hudi/pull/2125#discussion_r499150582



##########
File path: hudi-spark/src/main/scala/org/apache/hudi/IncrementalRelation.scala
##########
@@ -82,11 +81,11 @@ class IncrementalRelation(val sqlContext: SQLContext,
     optParams.getOrElse(DataSourceReadOptions.END_INSTANTTIME_OPT_KEY, lastInstant.getTimestamp))
     .getInstants.iterator().toList
 
-  // use schema from a file produced in the latest instant
-  val latestSchema: StructType = {
+  // use schema from a file produced in the end instant
+  val endInstantSchema: StructType = {
     log.info("Inferring schema..")
     val schemaResolver = new TableSchemaResolver(metaClient)
-    val tableSchema = schemaResolver.getTableAvroSchemaWithoutMetadataFields
+    val tableSchema = schemaResolver.getTableAvroSchemaWithoutMetadataFields(commitsToReturn.last)

Review comment:
       thanks for your remind, agree with you




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

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