voonhous commented on code in PR #19849:
URL: https://github.com/apache/hudi/pull/19849#discussion_r3951108177


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala:
##########
@@ -252,19 +241,7 @@ abstract class HoodieBaseRelation(val sqlContext: 
SQLContext,
     HoodieFileIndex(sparkSession, metaClient, Some(tableStructSchema), 
optParams,
       FileStatusCache.getOrCreate(sparkSession), shouldIncludeLogFiles())
 
-  lazy val tableState: HoodieTableState = {
-    val recordMergerImpls = 
optParams.get(HoodieWriteConfig.RECORD_MERGE_IMPL_CLASSES.key()).map(impls => 
ConfigUtils.split2List(impls).asScala.toList).getOrElse(List.empty)
-    // Subset of the state of table's configuration as of at the time of the 
query
-    HoodieTableState(tablePath = basePath.toString,
-      latestCommitTimestamp = queryTimestamp,
-      recordKeyField = recordKeyField,
-      orderingFields = orderingFields,
-      usesVirtualKeys = !tableConfig.populateMetaFields(),
-      metadataConfig = fileIndex.getMetadataConfig,
-      recordMergeImplClasses = recordMergerImpls,
-      recordMergeStrategyId = tableConfig.getRecordMergeStrategyId
-    )
-  }
+  protected lazy val latestCommitTimestamp: Option[String] = queryTimestamp

Review Comment:
   Pushed in `d06ca59`. `targetInstantTime` now lives on 
`BaseMergeOnReadSnapshotRelation`, the common parent of the three MOR 
relations, so `BaseFileOnlyRelation` and the bootstrap relation no longer 
inherit it.
   
   `queryTimestamp` widens to `protected` to allow the move, which adds no 
member since it was already on the class. The value is still a `lazy val`, so 
the capture-once timing you kept is unchanged; there is a scaladoc note on it 
saying why it is not a `def`.
   
   Since you mentioned you have no Java or Maven locally: `mvn compile 
-Dspark3.5` is green on JDK 17 across the 14 reactor modules with checkstyle 
and scalastyle, and `BaseHoodieTableFileIndexTest` passes.
   



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