Support creating tables with table comment in Delta Lake#12452
Conversation
376f02b to
b15fb16
Compare
Remove Kudu from the description ? |
0c3745b to
3876d2d
Compare
|
CI hit #12413 |
...lta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeOssDeltaLakeConnectorTest.java
Outdated
Show resolved
Hide resolved
...delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeDatabricksConnectorTest.java
Outdated
Show resolved
Hide resolved
3e946a3 to
f3b6a8e
Compare
f3b6a8e to
c8c05be
Compare
|
Rebased on upstream to resolve conflicts. |
c8c05be to
4dbbff8
Compare
|
Added a product test. Ready for review now. |
...roduct-tests/src/main/java/io/trino/tests/product/deltalake/TestDeltaLakeOssCreateTable.java
Outdated
Show resolved
Hide resolved
4dbbff8 to
554fac3
Compare
|
CI hit #12300 |
| { | ||
| if (block.isNull(position)) { | ||
| return null; | ||
| } |
There was a problem hiding this comment.
Does it add support for reading checkpoint files we didn't read before?
Should we have a test?
Also, should we have this for getLong, getInt, getByte methods?
If there are supposed to be called on non-null values only, we should probably
have checkArgument(block.isNull(position))` in them
There was a problem hiding this comment.
This is not new support. It returned an empty character before this change.
TestCheckpointEntryIterator covers both non-empty and null cases.
Added checkArgument to those three methods.
| "b6aeffad-da73-4dde-b68e-937e468b1fde", | ||
| "", | ||
| "", | ||
| null, |
There was a problem hiding this comment.
is "name" a table name? shouldn't it be present?
There was a problem hiding this comment.
It's optional "User-provided identifier for this table" according to https://github.com/delta-io/delta/blob/master/PROTOCOL.md#change-metadata.
I can send another PR if you agree on setting the field at https://github.com/trinodb/trino/blob/master/plugin/trino-delta-lake/src/main/java/io/trino/plugin/deltalake/DeltaLakeMetadata.java#L1004
| @JsonProperty | ||
| public Optional<String> getComment() | ||
| { | ||
| return metadataEntry.map(MetadataEntry::getDescription); |
There was a problem hiding this comment.
i think metadata should be present:
Optional.ofNullable(getMetadataEntry().getDescription())
There was a problem hiding this comment.
remove it from table handle class, let the caller do this
| assertEquals(getTableCommentOnDelta("default", tableName), "test comment"); | ||
| } | ||
| finally { | ||
| onDelta().executeQuery("DROP TABLE default." + tableName); |
There was a problem hiding this comment.
table was created on trino, so drop on trino as well
| } | ||
| } | ||
|
|
||
| private void testInsert(String tableName, List<QueryAssert.Row> existingRows) |
There was a problem hiding this comment.
this method is a helper method for the test above; put your new test below, so that the test and its helper remain grouped
554fac3 to
71dcb66
Compare
Description
Support creating tables with table comment in Delta Lake. Verified the Delta Lake's compatibility with Spark locally.
Documentation
(x) No documentation is needed.
Release notes
(x) Release notes entries required with the following suggested text: