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

[#3259] feat(spark-connector): Support atomic create or replace Iceberg table #3260

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

caican00
Copy link
Contributor

@caican00 caican00 commented May 3, 2024

What changes were proposed in this pull request?

Support atomic create or replace Iceberg table.

Why are the changes needed?

Support atomic create or replace Iceberg table.

Fix: #3259

Does this PR introduce any user-facing change?

No.

How was this patch tested?

New ITs.

@caican00 caican00 force-pushed the iceberg-stage-ddl branch 2 times, most recently from 3388498 to 388df1f Compare May 3, 2024 14:48
@caican00
Copy link
Contributor Author

Hi @FANNG1 could you help review this PR? Thank you.

@FANNG1
Copy link
Contributor

FANNG1 commented May 13, 2024

Hi @FANNG1 could you help review this PR? Thank you.

ok

@@ -416,4 +489,11 @@ private SparkMetadataColumnInfo[] getIcebergMetadataColumns() {
new SparkMetadataColumnInfo("_deleted", DataTypes.BooleanType, false)
};
}

private List<SparkTableInfo.SparkColumnInfo> getSimpleTableColumnWithoutComments() {
Copy link
Contributor

Choose a reason for hiding this comment

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

please add comment why add this method and when to use

String tableName = "test_atomic_create_table_as_select";
dropTableIfExists(tableName);

CatalogPlugin sparkIcebergCatalog =
Copy link
Contributor

Choose a reason for hiding this comment

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

is it necessary to add this check?

@@ -96,6 +103,28 @@ public UnboundFunction loadFunction(Identifier ident) throws NoSuchFunctionExcep
return ((SparkCatalog) sparkCatalog).loadFunction(ident);
}

@SuppressWarnings("deprecation")
@Override
public StagedTable stageCreate(
Copy link
Contributor

Choose a reason for hiding this comment

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

Gravitino doesn't support stage create for now, this will bypass the gravitino when create&replace table as select, I prefer to delay support of stage create for now. WDYT? cc @jerryshao

Copy link
Contributor Author

@caican00 caican00 May 14, 2024

Choose a reason for hiding this comment

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

Gravitino doesn't support stage create for now, this will bypass the gravitino when create&replace table as select, I prefer to delay support of stage create for now. WDYT? cc @jerryshao

@FANNG1 But rest apis don't support RTAS. Is the purpose an audit?

@caican00 caican00 marked this pull request as draft May 20, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] Support atomic create or replace Iceberg table
2 participants