-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Skip unsupported variant type in Delta Lake
- Loading branch information
Showing
7 changed files
with
104 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
plugin/trino-delta-lake/src/test/resources/databricks153/variant/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Data generated using Databricks 15.3: | ||
|
||
```sql | ||
CREATE TABLE default.test_variant | ||
(col_int INT, simple_variant variant, array_variant array<variant>, map_variant map<string, variant>, struct_variant struct<x variant>, col_string string) | ||
USING delta | ||
LOCATION ?; | ||
|
||
INSERT INTO default.test_variant | ||
VALUES (1, parse_json('{"col":1}'), array(parse_json('{"array":2}')), map('key1', parse_json('{"map":3}')), named_struct('x', parse_json('{"struct":4}')), 'test data'); | ||
``` |
3 changes: 3 additions & 0 deletions
3
...-delta-lake/src/test/resources/databricks153/variant/_delta_log/00000000000000000000.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{"commitInfo":{"timestamp":1717730845177,"userId":"7853186923043731","userName":"[email protected]","operation":"CREATE TABLE","operationParameters":{"partitionBy":"[]","clusterBy":"[]","description":null,"isManaged":"false","properties":"{\"delta.enableDeletionVectors\":\"true\"}","statsOnLoad":false},"notebook":{"notebookId":"1841155838656679"},"clusterId":"0607-024930-gxd23c26","isolationLevel":"WriteSerializable","isBlindAppend":true,"operationMetrics":{},"tags":{"restoresDeletedRows":"false"},"engineInfo":"Databricks-Runtime/15.3.x-scala2.12","txnId":"07db535a-1416-4a23-9373-b936fa0b900d"}} | ||
{"metaData":{"id":"ca2eb964-d3c1-4d4d-b5c8-2fa99d5f4884","format":{"provider":"parquet","options":{}},"schemaString":"{\"type\":\"struct\",\"fields\":[{\"name\":\"col_int\",\"type\":\"integer\",\"nullable\":true,\"metadata\":{}},{\"name\":\"simple_variant\",\"type\":\"variant\",\"nullable\":true,\"metadata\":{}},{\"name\":\"array_variant\",\"type\":{\"type\":\"array\",\"elementType\":\"variant\",\"containsNull\":true},\"nullable\":true,\"metadata\":{}},{\"name\":\"map_variant\",\"type\":{\"type\":\"map\",\"keyType\":\"string\",\"valueType\":\"variant\",\"valueContainsNull\":true},\"nullable\":true,\"metadata\":{}},{\"name\":\"struct_variant\",\"type\":{\"type\":\"struct\",\"fields\":[{\"name\":\"x\",\"type\":\"variant\",\"nullable\":true,\"metadata\":{}}]},\"nullable\":true,\"metadata\":{}},{\"name\":\"col_string\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}}]}","partitionColumns":[],"configuration":{"delta.enableDeletionVectors":"true"},"createdTime":1717730845102}} | ||
{"protocol":{"minReaderVersion":3,"minWriterVersion":7,"readerFeatures":["deletionVectors","variantType-preview"],"writerFeatures":["deletionVectors","variantType-preview"]}} |
2 changes: 2 additions & 0 deletions
2
...-delta-lake/src/test/resources/databricks153/variant/_delta_log/00000000000000000001.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{"commitInfo":{"timestamp":1717730850159,"userId":"7853186923043731","userName":"[email protected]","operation":"WRITE","operationParameters":{"mode":"Append","statsOnLoad":false,"partitionBy":"[]"},"notebook":{"notebookId":"1841155838656679"},"clusterId":"0607-024930-gxd23c26","readVersion":0,"isolationLevel":"WriteSerializable","isBlindAppend":true,"operationMetrics":{"numFiles":"1","numOutputRows":"1","numOutputBytes":"3369"},"tags":{"noRowsCopied":"true","restoresDeletedRows":"false"},"engineInfo":"Databricks-Runtime/15.3.x-scala2.12","txnId":"273dfda6-7058-4dc4-a39f-756fec108f84"}} | ||
{"add":{"path":"part-00000-38ffb03f-2761-4a76-ae81-d0f39c47852f-c000.snappy.parquet","partitionValues":{},"size":3369,"modificationTime":1717730850000,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"col_int\":1,\"col_string\":\"test data\"},\"maxValues\":{\"col_int\":1,\"col_string\":\"test data\"},\"nullCount\":{\"col_int\":0,\"simple_variant\":0,\"array_variant\":0,\"map_variant\":0,\"struct_variant\":{\"x\":0},\"col_string\":0},\"tightBounds\":true}","tags":{"INSERTION_TIME":"1717730850000000","MIN_INSERTION_TIME":"1717730850000000","MAX_INSERTION_TIME":"1717730850000000","OPTIMIZE_TARGET_SIZE":"268435456"}}} |
Binary file added
BIN
+3.29 KB
...databricks153/variant/part-00000-38ffb03f-2761-4a76-ae81-d0f39c47852f-c000.snappy.parquet
Binary file not shown.