Skip to content

Support write operations for S3 Tables in Iceberg#24994

Merged
ebyhr merged 1 commit intomasterfrom
ebi/iceberg-s3tables-write
Feb 18, 2025
Merged

Support write operations for S3 Tables in Iceberg#24994
ebyhr merged 1 commit intomasterfrom
ebi/iceberg-s3tables-write

Conversation

@ebyhr
Copy link
Copy Markdown
Member

@ebyhr ebyhr commented Feb 12, 2025

Description

Location class requires a small change because it doesn't allow S3 Tables path, e.g. s3://{random}--table-s3'.

Fixes #24916

cc: @jamesbornholt

Release notes

Release notes

(x) This is not user-visible or is docs only, and no release notes are required.

@cla-bot cla-bot bot added the cla-signed label Feb 12, 2025
@github-actions github-actions bot added the iceberg Iceberg connector label Feb 12, 2025
@ebyhr ebyhr force-pushed the ebi/iceberg-s3tables-write branch from 2cdbe89 to 96b0d68 Compare February 17, 2025 09:09
@ebyhr ebyhr marked this pull request as ready for review February 17, 2025 09:09
@ebyhr ebyhr force-pushed the ebi/iceberg-s3tables-write branch 2 times, most recently from 6f1f066 to a0b4b48 Compare February 17, 2025 23:45
@ebyhr ebyhr force-pushed the ebi/iceberg-s3tables-write branch from a0b4b48 to 679e686 Compare February 18, 2025 00:41
@ebyhr ebyhr merged commit e64defb into master Feb 18, 2025
@ebyhr ebyhr deleted the ebi/iceberg-s3tables-write branch February 18, 2025 02:13
@github-actions github-actions bot added this to the 471 milestone Feb 18, 2025
@mosabua
Copy link
Copy Markdown
Member

mosabua commented Feb 18, 2025

Why no release notes entry?

@ebyhr
Copy link
Copy Markdown
Member Author

ebyhr commented Feb 18, 2025

@mosabua We already have a release note entry for S3 Tables. There is no need to add another entry.

@mosabua
Copy link
Copy Markdown
Member

mosabua commented Feb 18, 2025

@mosabua We already have a release note entry for S3 Tables. There is no need to add another entry.

Oh .. fair enough .. I should probably modify to remove the "reading" .. because now we also support writing ;-)

assertThat(Locations.isS3Tables("s3://75fed916-b871-4909-mx9t6iohbseks57q16e5y6nf1c8gguse2b--table-s3")).isTrue();

assertThat(Locations.isS3Tables("s3://e97725d9-dbfb-4334-784sox7edps35ncq16arh546frqa1use2b--table-s3/")).isFalse();
assertThat(Locations.isS3Tables("s3://75fed916-b871-4909-mx9t6iohbseks57q16e5y6nf1c8gguse2b--table-s3/")).isFalse();
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.

Why is this false?
Why Locations.isS3Tables("s3://xxxxxxx--table-s3/foo-bar") is also false?

it looks like isS3Tables works only for the top of the bucket, which is not intuitive


if (!computedStatistics.isEmpty()) {
if (isS3Tables(icebergTable.location())) {
log.debug("S3 Tables does not support statistics: %s", table.name());
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.

That shouldn't be checked in finishInsert. Rather, getStatisticsCollectionMetadataForWrite should instruct the engine not to bother collecting stats, if they are not going to be persisted.

void updateViewColumnComment(ConnectorSession session, SchemaTableName schemaViewName, String columnName, Optional<String> comment);

@Nullable
String defaultTableLocation(ConnectorSession session, SchemaTableName schemaTableName);
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.

defaultTableLocation should be changed to return Optional
(ideally Optional<Location> rather than Optional<String>)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed iceberg Iceberg connector

Development

Successfully merging this pull request may close these issues.

Support write operations for S3 Tables in Iceberg

4 participants