Skip to content

Commit

Permalink
[HUDI-7102] Fix bugs related to time travel queries (#10102)
Browse files Browse the repository at this point in the history
  • Loading branch information
linliu-code authored Nov 29, 2023
1 parent d1dfa5b commit 91daa7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ private void scanInternalV1(Option<KeySpec> keySpecOpt) {
&& !HoodieTimeline.compareTimestamps(logBlock.getLogBlockHeader().get(INSTANT_TIME), HoodieTimeline.LESSER_THAN_OR_EQUALS, this.latestInstantTime
)) {
// hit a block with instant time greater than should be processed, stop processing further
break;
continue;
}
if (logBlock.getBlockType() != CORRUPT_BLOCK && logBlock.getBlockType() != COMMAND_BLOCK) {
if (!completedInstantsTimeline.containsOrBeforeTimelineStarts(instantTime)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,7 @@ object DefaultSource {
new IncrementalRelation(sqlContext, parameters, userSchema, metaClient)

case (MERGE_ON_READ, QUERY_TYPE_SNAPSHOT_OPT_VAL, false) =>
val isTimeTravelQuery = parameters.contains(TIME_TRAVEL_AS_OF_INSTANT.key())
if (fileFormatUtils.isDefined && !isTimeTravelQuery) {
if (fileFormatUtils.isDefined) {
new HoodieMergeOnReadSnapshotHadoopFsRelationFactory(
sqlContext, metaClient, parameters, userSchema, isBootstrap = false).build()
} else {
Expand Down

0 comments on commit 91daa7d

Please sign in to comment.