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

[#4062] feat(iceberg-rest-server): support RegisterTable for Iceberg REST server #4088

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

FANNG1
Copy link
Contributor

@FANNG1 FANNG1 commented Jul 5, 2024

What changes were proposed in this pull request?

  1. upgrade Iceberg version to 1.5.2
  2. support register table interface for Iceberg REST server

Why are the changes needed?

Fix: #4062

Does this PR introduce any user-facing change?

no

How was this patch tested?

  1. add UT and IT
  2. test in local env

@FANNG1 FANNG1 marked this pull request as draft July 5, 2024 09:12
@FANNG1 FANNG1 changed the title Register1 [SIP] support RegisterTable for Iceberg REST server Jul 5, 2024
@FANNG1 FANNG1 force-pushed the register1 branch 7 times, most recently from 45adcf0 to 14eb09a Compare July 10, 2024 10:32
@FANNG1 FANNG1 force-pushed the register1 branch 3 times, most recently from 8e81f3b to 0005f70 Compare July 23, 2024 12:18
@@ -60,7 +60,7 @@ void testLoadCatalog() {
});

Map<String, String> properties = new HashMap<>();
properties.put(CatalogProperties.URI, "jdbc://0.0.0.0:3306");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the new Iceberg version will check the correctness of jdbc uri

@@ -107,10 +108,10 @@ private Response doLoadTable(String name) {
}

private Response doUpdateTable(String name, TableMetadata base) {
MetadataUpdate addSchema = new AddSchema(newTableSchema, base.lastColumnId());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

API changes for new Iceberg Version

@FANNG1 FANNG1 marked this pull request as ready for review July 23, 2024 14:42
@FANNG1 FANNG1 marked this pull request as draft July 23, 2024 14:43
@FANNG1 FANNG1 changed the title [SIP] support RegisterTable for Iceberg REST server [#4062] support RegisterTable for Iceberg REST server Jul 24, 2024
@FANNG1 FANNG1 changed the title [#4062] support RegisterTable for Iceberg REST server [#4062] feat(iceberg-rest-server): support RegisterTable for Iceberg REST server Jul 24, 2024
@FANNG1 FANNG1 marked this pull request as ready for review July 24, 2024 02:42
@FANNG1
Copy link
Contributor Author

FANNG1 commented Jul 24, 2024

@jerryshao please help to review when you have time

convertToStringList(
sql(
String.format(
"select file from %s.%s.metadata_log_entries", registerDB, registerTableName)),
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please make all the SQL keywords uppercase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Assertions.assertEquals(ImmutableMap.of("1", "a"), result);

// insert other data
sql(" INSERT INTO iceberg_rest_table_test.register_foo2 VALUES (2, 'b')");
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the whitespace before "INSERT".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@FANNG1
Copy link
Contributor Author

FANNG1 commented Jul 31, 2024

@jerryshao @jerqi , comments are addressed, could you help to review again?

@jerryshao jerryshao merged commit cdb54d9 into apache:main Jul 31, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Subtask] support registerTable interface for Iceberg REST server
2 participants