vinishjail97 commented on code in PR #861:
URL: https://github.com/apache/incubator-xtable/pull/861#discussion_r3761651813
##########
xtable-core/src/main/java/org/apache/xtable/delta/DeltaConversionSource.java:
##########
@@ -103,10 +113,52 @@ public InternalSnapshot getCurrentSnapshot() {
@Override
public TableChange getTableChangeForCommit(Long versionNumber) {
List<Action> actionsForVersion =
getChangesState().getActionsForVersion(versionNumber);
- Snapshot snapshotAtVersion = deltaLog.getSnapshotAt(versionNumber,
Option.empty());
- InternalTable tableAtVersion = tableExtractor.table(snapshotAtVersion,
tableName);
- FileFormat fileFormat =
-
actionsConverter.convertToFileFormat(snapshotAtVersion.metadata().format().provider());
+ String tableBasePath = deltaLog.dataPath().toUri().toString();
+ InternalTable tableAtVersion;
+ FileFormat fileFormat;
+ if (reuseMetadataAcrossCommits) {
Review Comment:
Done in `7249dee9`. The block is now
`resolveMetadataForCommit(versionNumber, actionsForVersion)`, which holds the
ordering guard, the last-in-commit `Metadata` scan and the baseline/refresh of
`cachedMetadata`, and returns the metadata. The branch at the call site is down
to three lines, so both arms of the `if` read at the same altitude. The cache
rationale moved into the method javadoc; the watermark comment stayed at the
call site since it explains the timestamp rather than the cache. No behaviour
change — `mvn verify` on `xtable-core` is green (133 unit, 19 IT including
`ITDeltaConversionSource`, 0 failures).
--
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]