-
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.
Support reading timestamp_ntz type in Delta Lake
- Loading branch information
Showing
21 changed files
with
186 additions
and
9 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
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
19 changes: 19 additions & 0 deletions
19
plugin/trino-delta-lake/src/test/resources/databricks/timestamp_ntz/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,19 @@ | ||
Data generated using Databricks 13.1: | ||
|
||
```sql | ||
CREATE TABLE default.test_timestamp_ntz | ||
(x timestamp_ntz) | ||
USING delta | ||
LOCATION 's3://bucket/table' | ||
TBLPROPERTIES ('delta.feature.timestampNtz' = 'supported'); | ||
|
||
INSERT INTO default.test_timestamp_ntz VALUES | ||
(NULL), | ||
(TIMESTAMP_NTZ '-9999-12-31T23:59:59.999999'), | ||
(TIMESTAMP_NTZ '-0001-01-01T00:00:00.000000'), | ||
(TIMESTAMP_NTZ '0000-01-01T00:00:00.000000'), | ||
(TIMESTAMP_NTZ '1582-10-05T00:00:00.000000'), | ||
(TIMESTAMP_NTZ '1582-10-14T23:59:59.999999'), | ||
(TIMESTAMP_NTZ '2020-12-31T01:02:03.123456'), | ||
(TIMESTAMP_NTZ '9999-12-31T23:59:59.999999'); | ||
``` |
3 changes: 3 additions & 0 deletions
3
...lta-lake/src/test/resources/databricks/timestamp_ntz/_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":1684140545733,"userId":"7853186923043731","userName":"[email protected]","operation":"CREATE TABLE","operationParameters":{"isManaged":"false","description":null,"partitionBy":"[]","properties":"{\"delta.feature.timestampntz\":\"supported\"}"},"notebook":{"notebookId":"824234330454407"},"clusterId":"0515-061003-bamkihe4","isolationLevel":"WriteSerializable","isBlindAppend":true,"operationMetrics":{},"engineInfo":"Databricks-Runtime/13.1.x-scala2.12","txnId":"74bed3b7-6080-4ca8-9ea7-536505dc6e24"}} | ||
{"protocol":{"minReaderVersion":3,"minWriterVersion":7,"readerFeatures":["timestampNtz"],"writerFeatures":["timestampNtz"]}} | ||
{"metaData":{"id":"54a9d74c-2777-4eed-85aa-8a95732f5a74","format":{"provider":"parquet","options":{}},"schemaString":"{\"type\":\"struct\",\"fields\":[{\"name\":\"x\",\"type\":\"timestamp_ntz\",\"nullable\":true,\"metadata\":{}}]}","partitionColumns":[],"configuration":{},"createdTime":1684140544719}} |
2 changes: 2 additions & 0 deletions
2
...lta-lake/src/test/resources/databricks/timestamp_ntz/_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":1684140582215,"userId":"7853186923043731","userName":"[email protected]","operation":"WRITE","operationParameters":{"mode":"Append","partitionBy":"[]"},"notebook":{"notebookId":"824234330454407"},"clusterId":"0515-061003-bamkihe4","readVersion":0,"isolationLevel":"WriteSerializable","isBlindAppend":true,"operationMetrics":{"numFiles":"1","numOutputRows":"8","numOutputBytes":"673"},"tags":{"restoresDeletedRows":"false"},"engineInfo":"Databricks-Runtime/13.1.x-scala2.12","txnId":"38fb0b0b-17c0-4263-bc78-93b74a459cce"}} | ||
{"add":{"path":"part-00000-0ca99241-8aa7-4f33-981b-e6fd611fe062-c000.snappy.parquet","partitionValues":{},"size":673,"modificationTime":1684140581000,"dataChange":true,"stats":"{\"numRecords\":8,\"nullCount\":{\"x\":1}}","tags":{"INSERTION_TIME":"1684140581000000","MIN_INSERTION_TIME":"1684140581000000","MAX_INSERTION_TIME":"1684140581000000","OPTIMIZE_TARGET_SIZE":"268435456"}}} |
Binary file added
BIN
+673 Bytes
...abricks/timestamp_ntz/part-00000-0ca99241-8aa7-4f33-981b-e6fd611fe062-c000.snappy.parquet
Binary file not shown.
20 changes: 20 additions & 0 deletions
20
...rino-delta-lake/src/test/resources/databricks/timestamp_ntz_partition/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,20 @@ | ||
Data generated using Databricks 13.1: | ||
|
||
```sql | ||
CREATE TABLE default.test_timestamp_ntz_partition | ||
(id int, part timestamp_ntz) | ||
USING delta | ||
PARTITIONED BY (part) | ||
LOCATION 's3://bucket/table' | ||
TBLPROPERTIES ('delta.feature.timestampNtz' = 'supported'); | ||
|
||
INSERT INTO default.test_timestamp_ntz_partition VALUES | ||
(1, NULL), | ||
(2, TIMESTAMP_NTZ '-9999-12-31T23:59:59.999999'), | ||
(3, TIMESTAMP_NTZ '-0001-01-01T00:00:00.000000'), | ||
(4, TIMESTAMP_NTZ '0000-01-01T00:00:00.000000'), | ||
(5, TIMESTAMP_NTZ '1582-10-05T00:00:00.000000'), | ||
(6, TIMESTAMP_NTZ '1582-10-14T23:59:59.999999'), | ||
(7, TIMESTAMP_NTZ '2020-12-31T01:02:03.123456'), | ||
(8, TIMESTAMP_NTZ '9999-12-31T23:59:59.999999'); | ||
``` |
Oops, something went wrong.