Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Updated API for Iceberg read operations #6268

Merged
merged 13 commits into from
Oct 28, 2024

Conversation

malhotrashivam
Copy link
Contributor

@malhotrashivam malhotrashivam commented Oct 22, 2024

BREAKING CHANGES / Documentation Update:

As a follow up to #5707, following are the main changes:

  • Rename IcebergInstructions to IcebergReadInstructions
  • Moved all arguments from read APIs for IcebergTableAdaper::definition, IcebergTableAdaper::definitionTable, and IcebergTableAdaper::table to inside IcebergReadInstructions to reduce the overloads.

For example,

Before

iceberg_instructions = IcebergInstructions.builder()
    .updateMode(IcebergUpdateMode.autoRefreshingMode(1_000L))
    .build()
sales_multi = tableAdapter.table(848129305390678414L, iceberg_instructions) 
// 848129305390678414L is the snapshot ID to be loaded

After

iceberg_instructions = IcebergInstructions.builder()
    .snapshotId(848129305390678414L)
    .updateMode(IcebergUpdateMode.autoRefreshingMode(1_000L))
    .build()
sales_multi = tableAdapter.table(iceberg_instructions) 

@malhotrashivam malhotrashivam added documentation Improvements or additions to documentation breaking ReleaseNotesNeeded Release notes are needed iceberg labels Oct 22, 2024
@malhotrashivam malhotrashivam added this to the 0.37.0 milestone Oct 22, 2024
@malhotrashivam malhotrashivam self-assigned this Oct 22, 2024
@malhotrashivam malhotrashivam added DocumentationNeeded and removed documentation Improvements or additions to documentation labels Oct 22, 2024
@lbooker42
Copy link
Contributor

lbooker42 commented Oct 23, 2024

One more thing, the nesting of IcebergReadInstructions inside IcebergReadTable makes me wonder if we really need two levels at all? Can we specialize IcebergReadInstructions to include schema, snapshot, etc. and only have one builder? Not sure that makes sense in writing though


// Load the table from the catalog.
return definition(tableSnapshot, instructions);
private static final class SpecAndSchema {
Copy link
Contributor

Choose a reason for hiding this comment

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

I might argue that Snapshot should be represented here rather than a re-written instruction object.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, maybe not. Rewriting might be exactly what we want. @devinrsmith wants to include Schema instructions in these calls so maybe populating the instructions with snapshot now (and Schema later) is the right idea.

lbooker42
lbooker42 previously approved these changes Oct 23, 2024
Copy link
Contributor

@jmao-denver jmao-denver left a comment

Choose a reason for hiding this comment

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

The Python changes LGTM.
Do we need to tag it as 'breaking' even if it is experimental? Just for release notes purpose?

@malhotrashivam
Copy link
Contributor Author

The Python changes LGTM. Do we need to tag it as 'breaking' even if it is experimental? Just for release notes purpose?

I tagged it breaking also from Java point of view because we are changing all the iceberg read APIs.

@jmao-denver jmao-denver changed the title feat: Updated API for Iceberg read operations feat!: Updated API for Iceberg read operations Oct 25, 2024
chipkent
chipkent previously approved these changes Oct 25, 2024
Copy link
Member

@chipkent chipkent left a comment

Choose a reason for hiding this comment

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

Python LGTM

Copy link
Member

@rcaudy rcaudy left a comment

Choose a reason for hiding this comment

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

I like it. Minor questions/quibbles only.

rcaudy
rcaudy previously approved these changes Oct 25, 2024
Copy link
Member

@devinrsmith devinrsmith left a comment

Choose a reason for hiding this comment

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

I think we need to follow up right after this with #6124, at least plumbing-wise.

@malhotrashivam malhotrashivam merged commit 703f527 into deephaven:main Oct 28, 2024
17 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 28, 2024
@deephaven-internal
Copy link
Contributor

Labels indicate documentation is required. Issues for documentation have been opened:

Community: deephaven/deephaven-docs-community#335

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants