-
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
Add register_table
procedure support for delta table
#14779
Conversation
05c7aaa
to
5df0865
Compare
ce19fb2
to
81456e5
Compare
ae2fba1
to
68cce18
Compare
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.
Do you have a test that shows the legacy syntax can be re-enabled?
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeConfig.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeConfig.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeSessionProperties.java
Outdated
Show resolved
Hide resolved
plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeConfig.java
Outdated
Show resolved
Hide resolved
...ino-delta-lake/src/main/java/io/trino/plugin/deltalake/procedure/RegisterTableProcedure.java
Outdated
Show resolved
Hide resolved
...ino-delta-lake/src/main/java/io/trino/plugin/deltalake/procedure/RegisterTableProcedure.java
Outdated
Show resolved
Hide resolved
...ino-delta-lake/src/main/java/io/trino/plugin/deltalake/procedure/RegisterTableProcedure.java
Outdated
Show resolved
Hide resolved
...ino-delta-lake/src/main/java/io/trino/plugin/deltalake/procedure/RegisterTableProcedure.java
Outdated
Show resolved
Hide resolved
String tableNameNew = "test_register_table_with_no_transaction_log_new_" + randomTableSuffix(); | ||
|
||
// Delete files under transaction log directory to verify register_table call fails | ||
deleteDirectoryContents(Path.of(getTransactionLogDir(new org.apache.hadoop.fs.Path(tableLocation)).toString()), ALLOW_INSECURE); |
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.
You could also just create the table using the Hive or Iceberg connectors, if you have one of those catalogs configured for the test
CREATE TABLE hive.schema.table_name ...
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.
Just to confirm that I understand correctly, We can create a table using Hive or Iceberg connectors to verify the delta test cases where delta logs are missing?
No, Not yet. I will add the test case for this. |
d99b7d9
to
bb666ee
Compare
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...ta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeRegisterTableProcedureTest.java
Outdated
Show resolved
Hide resolved
...ta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeRegisterTableProcedureTest.java
Outdated
Show resolved
Hide resolved
...ta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeRegisterTableProcedureTest.java
Outdated
Show resolved
Hide resolved
...st/java/io/trino/plugin/deltalake/TestDeltaLakeRegisterTableProcedureUsingHiveMetastore.java
Outdated
Show resolved
Hide resolved
...o/plugin/deltalake/metastore/glue/TestDeltaLakeRegisterTableProcedureUsingGlueMetastore.java
Outdated
Show resolved
Hide resolved
...o/plugin/deltalake/metastore/glue/TestDeltaLakeRegisterTableProcedureUsingGlueMetastore.java
Outdated
Show resolved
Hide resolved
b7aa101
to
9f60dad
Compare
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
c4ad97c
to
55bdd02
Compare
rebased and added |
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
...ta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeRegisterTableProcedureTest.java
Outdated
Show resolved
Hide resolved
.../test/java/io/trino/plugin/deltalake/TestDeltaLakeLegacyCreateTableWithExistingLocation.java
Outdated
Show resolved
Hide resolved
...o/plugin/deltalake/metastore/glue/TestDeltaLakeRegisterTableProcedureUsingGlueMetastore.java
Outdated
Show resolved
Hide resolved
...st/java/io/trino/plugin/deltalake/TestDeltaLakeRegisterTableProcedureUsingHiveMetastore.java
Outdated
Show resolved
Hide resolved
...rino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeConnectorSmokeTest.java
Outdated
Show resolved
Hide resolved
b94091b
to
aceba06
Compare
3fb76ff
to
f0f9499
Compare
...ta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeRegisterTableProcedureTest.java
Outdated
Show resolved
Hide resolved
...ta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeRegisterTableProcedureTest.java
Outdated
Show resolved
Hide resolved
...ta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaLakeRegisterTableProcedureTest.java
Outdated
Show resolved
Hide resolved
.../test/java/io/trino/plugin/deltalake/TestDeltaLakeLegacyCreateTableWithExistingLocation.java
Show resolved
Hide resolved
LGTM % some minor test related improvements. |
f0f9499
to
91c8885
Compare
91c8885
to
71dedbc
Compare
CI hit #15173 |
@hangc0276 pls sketch your scenario in a new github issue - your question is not related to this PR. To be taken into account when writing the new issue
Was writing in the newly registered table happening through |
Description
Fixes #13568
delta.system.register_table(shcema_name => 'testdb', table_name => 'table1', table_location => 's3://my-bukcet/a/path/')
CREATE TABLE
with(location='***')
will not allow to register table using existing location.delta.create-table-with-existing-location.enabled
config property orcreate_table_with_existing_location_enabled
session property to allow user to register table usingCREATE TABLE
statement (This support will be removed permanently after some release)register_table
procedure is disabled. Enable it viadelta.allow-register-table-procedure
config propertyNon-technical explanation
NA
Release notes
( ) This is not user-visible or docs only and no release notes are required.
(X) Release notes are required, please propose a release note for me.
( ) Release notes are required, with the following suggested text: