Skip to content

Delta Lake: Read mandatory current version starting from table's read version#21008

Merged
ebyhr merged 1 commit into
trinodb:masterfrom
findinpath:findinpath/delta-lake-reduce-file-accesses
Mar 11, 2024
Merged

Delta Lake: Read mandatory current version starting from table's read version#21008
ebyhr merged 1 commit into
trinodb:masterfrom
findinpath:findinpath/delta-lake-reduce-file-accesses

Conversation

@findinpath
Copy link
Copy Markdown
Contributor

Description

Use the version of the table handle, instead of the version from _last_checkpoint file for finding out which is effectively the latest version of the table.

Additional context and related issues

Fixes #16782

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text:

# Section
* Fix some things. ({issue}`issuenumber`)
Use the version of the table handle, instead of the version from _last_checkpoint
file for finding out which is effectively the latest version of the table.
@cla-bot cla-bot Bot added the cla-signed label Mar 11, 2024
@findinpath findinpath self-assigned this Mar 11, 2024
@findinpath findinpath added the delta-lake Delta Lake connector label Mar 11, 2024
throws IOException
{
long version = readLastCheckpoint(fileSystem, tableLocation).map(LastCheckpoint::getVersion).orElse(0L);
long version = readVersion;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: rename method parameter to get rid of this assignment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this assignment is intentional because it's mutable object.

@ebyhr ebyhr merged commit d92cdd3 into trinodb:master Mar 11, 2024
@github-actions github-actions Bot added this to the 441 milestone Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed delta-lake Delta Lake connector

3 participants