Skip to content

feat(iceberg): refine iceberg table column datatype and name. #19690

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

Merged
merged 73 commits into from
Dec 10, 2024

Conversation

chenzl25
Copy link
Contributor

@chenzl25 chenzl25 commented Dec 5, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

  • Tracking: Iceberg engine table #19418
  • Previously, the iceberg engine table replaced the scan with the iceberg source in the binder, but it will make the batch query datatype different from the datatype defined in the table. This PR moves this replacement from the binder to the optimizer and casts iceberg datatype to risingwave datatype.
  • Support those types that aren't supported in Iceberg (like jsonb, smallint, serial, and so on).
  • Iceberg V3 spec use _row_id as a reserved column name for row lineage, so if the table without primary key, we can't use _row_id directly for iceberg, this PR change it to _risingwave_iceberg_row_id

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • I have added test labels as necessary. See details.
  • I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features Sqlsmith: Sql feature generation #7934).
  • My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
  • All checks passed in ./risedev check (or alias, ./risedev c)
  • My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)
  • My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

  • My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note

If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

@github-actions github-actions bot added the type/feature Type: New feature. label Dec 5, 2024
@chenzl25 chenzl25 requested review from xxchan and BugenZhao December 5, 2024 11:30
@chenzl25 chenzl25 requested review from Li0k and xiangjinwu December 5, 2024 14:16
@graphite-app graphite-app bot requested a review from a team December 5, 2024 16:37
@chenzl25 chenzl25 requested a review from fuyufjh December 10, 2024 05:25
Copy link
Collaborator

@fuyufjh fuyufjh left a comment

Choose a reason for hiding this comment

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

LGTM

input_ref
}
} else {
// fields like `_rw_timestamp`, would not be found in source.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there any other example?

I am think whether we should bail! if a column is not found in the Iceberg source and it's not _rw_timestamp

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think _rw_timestamp is the only one that would hit this branch.

I am think whether we should bail! if a column is not found in the Iceberg source and it's not _rw_timestamp

This is the planner's beginning, so we must select all columns from a table (including the _rw_timestamp) unless we move this conversion to the end of the optimizer (after column pruning).

@chenzl25 chenzl25 added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit 6eadbde Dec 10, 2024
28 of 29 checks passed
@chenzl25 chenzl25 deleted the dylan/fix_column_data_types_for_iceberg_engine_table branch December 10, 2024 07:33
@chenzl25 chenzl25 mentioned this pull request Dec 12, 2024
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature Type: New feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants