-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Use unique table locations in Iceberg by default #12941
Use unique table locations in Iceberg by default #12941
Conversation
@@ -46,7 +46,7 @@ | |||
private HiveCompressionCodec compressionCodec = ZSTD; | |||
private boolean useFileSizeFromMetadata = true; | |||
private int maxPartitionsPerWriter = 100; | |||
private boolean uniqueTableLocation; | |||
private boolean uniqueTableLocation = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test for the default value should be also adjusted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM % failing test
f86b557
to
9d0eafb
Compare
@alexjo2144 you need to rebase |
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergConnectorTest.java
Outdated
Show resolved
Hide resolved
...no-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveRedirectionToIceberg.java
Outdated
Show resolved
Hide resolved
...no-product-tests/src/main/java/io/trino/tests/product/hive/TestHiveRedirectionToIceberg.java
Outdated
Show resolved
Hide resolved
...sts/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkDropTableCompatibility.java
Outdated
Show resolved
Hide resolved
...sts/src/main/java/io/trino/tests/product/iceberg/TestIcebergSparkDropTableCompatibility.java
Outdated
Show resolved
Hide resolved
9d0eafb
to
d107f5e
Compare
All set, thank you all for the reviews |
assertThat(onTrino().executeQuery("SHOW CREATE TABLE test_dropped_partition_field")) | ||
.containsOnly( | ||
row("CREATE TABLE iceberg.default.test_dropped_partition_field (\n" + | ||
Assertions.assertThat((String) onTrino().executeQuery("SHOW CREATE TABLE test_dropped_partition_field").row(0).get(0)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getOnlyElement
row("CREATE TABLE iceberg.default.test_dropped_partition_field (\n" + | ||
Assertions.assertThat((String) onTrino().executeQuery("SHOW CREATE TABLE test_dropped_partition_field").row(0).get(0)) | ||
.matches( | ||
"CREATE TABLE iceberg.default.test_dropped_partition_field \\(\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use \\Q
here too
Pattern locationPattern = Pattern.compile(".*location = 'hdfs://hadoop-master:9000(.*?)'.*", Pattern.DOTALL); | ||
Matcher m = locationPattern.matcher((String) onTrino().executeQuery("SHOW CREATE TABLE " + tableName).row(0).get(0)); | ||
if (m.find()) { | ||
verify(m.groupCount() == 1, "Location regex only expected one group but found " + m.groupCount()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String location = m.group(1);
verify(!m.find(), "Unexpected second match");
return location;
d107f5e
to
b566c43
Compare
Updated. @findepi might be worth running with secrets for Glue? |
Test PR with secrets: #12981 |
CI: #12950 |
b566c43
to
0ddd006
Compare
Rebased for conflicts |
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergMaterializedViewTest.java
Outdated
Show resolved
Hide resolved
plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/BaseIcebergMaterializedViewTest.java
Outdated
Show resolved
Hide resolved
...roduct-tests/src/main/java/io/trino/tests/product/iceberg/TestIcebergPartitionEvolution.java
Show resolved
Hide resolved
7179028
to
83992ad
Compare
83992ad
to
7b8067f
Compare
7b8067f
to
866ddb0
Compare
Checks are passing ✔️ |
Description
Enable the unique table location feature by default in the Iceberg connector
Enabling an existing feature by default
Iceberg connector
Related issues, pull requests, and links
Fixes: #5632
Documentation
( ) No documentation is needed.
(x) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
( ) No release notes entries required.
(x) Release notes entries required with the following suggested text: