-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support read 'p' type deletion vectors in Delta Lake
- Loading branch information
1 parent
b1d2302
commit 5286b97
Showing
17 changed files
with
86 additions
and
11 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
6 changes: 6 additions & 0 deletions
6
.../resources/deltalake/p_type_deletion_vectors/p_deletion_vector_cloned/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,6 @@ | ||
Data generated using OSS Delta Lake 3.3.0. | ||
|
||
|
||
```sql | ||
CREATE TABLE p_deletion_vector_cloned SHALLOW CLONE p_deletion_vector_source; | ||
``` |
Binary file added
BIN
+17.9 KB
...etion_vectors/p_deletion_vector_cloned/_delta_log/00000000000000000000.checkpoint.parquet
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
...ake/p_type_deletion_vectors/p_deletion_vector_cloned/_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,5 @@ | ||
{"commitInfo":{"timestamp":1738897446671,"operation":"CLONE","operationParameters":{"source":"spark_catalog.tiny.p_deletion_vector_source","sourceVersion":3},"readVersion":-1,"isolationLevel":"Serializable","isBlindAppend":false,"operationMetrics":{"removedFilesSize":"0","numRemovedFiles":"0","sourceTableSize":"872","numCopiedFiles":"0","copiedFilesSize":"0","sourceNumOfFiles":"2"},"engineInfo":"Apache-Spark/3.5.3 Delta-Lake/3.3.0","txnId":"50d6ccd3-3852-49d5-89f3-124194aa6a3b"}} | ||
{"metaData":{"id":"e593184d-67ce-4987-8c34-4a6ff4603e64","format":{"provider":"parquet","options":{}},"schemaString":"{\"type\":\"struct\",\"fields\":[{\"name\":\"v\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"part\",\"type\":\"date\",\"nullable\":true,\"metadata\":{}}]}","partitionColumns":["part"],"configuration":{"delta.enableDeletionVectors":"true"},"createdTime":1738897033368}} | ||
{"add":{"path":"s3://test-bucket/tiny/p_deletion_vector_source/part=2025-01-02/part-00000-088e57c5-0719-4c6e-9f74-2200eefbf737.c000.snappy.parquet","partitionValues":{"part":"2025-01-02"},"size":436,"modificationTime":1738897298000,"dataChange":true,"stats":"{\"numRecords\":2,\"minValues\":{\"v\":\"3\"},\"maxValues\":{\"v\":\"4\"},\"nullCount\":{\"v\":0},\"tightBounds\":false}","deletionVector":{"storageType":"p","pathOrInlineDv":"s3://test-bucket/tiny/p_deletion_vector_source/deletion_vector_ace02373-6e93-4445-bfc5-a5f3af97725e.bin","offset":1,"sizeInBytes":34,"cardinality":1}}} | ||
{"add":{"path":"s3://test-bucket/tiny/p_deletion_vector_source/part=2025-01-01/part-00000-b402fe5d-d2d9-461e-845c-67519cc5e5b7.c000.snappy.parquet","partitionValues":{"part":"2025-01-01"},"size":436,"modificationTime":1738897298000,"dataChange":true,"stats":"{\"numRecords\":2,\"minValues\":{\"v\":\"1\"},\"maxValues\":{\"v\":\"2\"},\"nullCount\":{\"v\":0},\"tightBounds\":false}","deletionVector":{"storageType":"p","pathOrInlineDv":"s3://test-bucket/tiny/p_deletion_vector_source/deletion_vector_ace02373-6e93-4445-bfc5-a5f3af97725e.bin","offset":43,"sizeInBytes":34,"cardinality":1}}} | ||
{"protocol":{"minReaderVersion":3,"minWriterVersion":7,"readerFeatures":["deletionVectors"],"writerFeatures":["deletionVectors","appendOnly","invariants"]}} |
20 changes: 20 additions & 0 deletions
20
.../resources/deltalake/p_type_deletion_vectors/p_deletion_vector_source/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 OSS Delta Lake 3.3.0. | ||
|
||
|
||
```sql | ||
CREATE TABLE p_deletion_vector_source | ||
(v string, part date) | ||
USING DELTA | ||
PARTITIONED BY (part) | ||
TBLPROPERTIES | ||
('delta.enableDeletionVectors' = 'true'); | ||
|
||
INSERT INTO p_deletion_vector_source VALUES (1, '2025-01-01'), | ||
(2, '2025-01-01'), | ||
(3, '2025-01-02'), | ||
(4, '2025-01-02'); | ||
|
||
OPTIMIZE p_deletion_vector_source; | ||
|
||
DELETE FROM p_deletion_vector_source WHERE v IN (2, 3); | ||
``` |
3 changes: 3 additions & 0 deletions
3
...ake/p_type_deletion_vectors/p_deletion_vector_source/_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":1738897033643,"operation":"CREATE TABLE","operationParameters":{"partitionBy":"[\"part\"]","clusterBy":"[]","description":null,"isManaged":"true","properties":"{\"delta.enableDeletionVectors\":\"true\"}"},"isolationLevel":"Serializable","isBlindAppend":true,"operationMetrics":{},"engineInfo":"Apache-Spark/3.5.3 Delta-Lake/3.3.0","txnId":"3b379603-3838-438b-a186-f3fce1d3894b"}} | ||
{"metaData":{"id":"5429a887-7b5b-4a03-a7ee-3b7bd8e7f522","format":{"provider":"parquet","options":{}},"schemaString":"{\"type\":\"struct\",\"fields\":[{\"name\":\"v\",\"type\":\"string\",\"nullable\":true,\"metadata\":{}},{\"name\":\"part\",\"type\":\"date\",\"nullable\":true,\"metadata\":{}}]}","partitionColumns":["part"],"configuration":{"delta.enableDeletionVectors":"true"},"createdTime":1738897033368}} | ||
{"protocol":{"minReaderVersion":3,"minWriterVersion":7,"readerFeatures":["deletionVectors"],"writerFeatures":["deletionVectors","appendOnly","invariants"]}} |
5 changes: 5 additions & 0 deletions
5
...ake/p_type_deletion_vectors/p_deletion_vector_source/_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,5 @@ | ||
{"commitInfo":{"timestamp":1738897245923,"operation":"WRITE","operationParameters":{"mode":"Append","partitionBy":"[]"},"readVersion":0,"isolationLevel":"Serializable","isBlindAppend":true,"operationMetrics":{"numFiles":"4","numOutputRows":"4","numOutputBytes":"1748"},"engineInfo":"Apache-Spark/3.5.3 Delta-Lake/3.3.0","txnId":"8f6dbdc8-5ded-4b92-9b20-f4e401411068"}} | ||
{"add":{"path":"part=2025-01-01/part-00000-8e4bc0e0-50bb-4d9b-b938-87a1f3db8fdc.c000.snappy.parquet","partitionValues":{"part":"2025-01-01"},"size":437,"modificationTime":1738897245000,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"v\":\"1\"},\"maxValues\":{\"v\":\"1\"},\"nullCount\":{\"v\":0},\"tightBounds\":true}"}} | ||
{"add":{"path":"part=2025-01-01/part-00001-ebe34a24-f74d-4361-862f-c0f893baa5ab.c000.snappy.parquet","partitionValues":{"part":"2025-01-01"},"size":437,"modificationTime":1738897245000,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"v\":\"2\"},\"maxValues\":{\"v\":\"2\"},\"nullCount\":{\"v\":0},\"tightBounds\":true}"}} | ||
{"add":{"path":"part=2025-01-02/part-00002-a6d9f5d1-4c7e-41f4-b5b8-4d7b7c59d283.c000.snappy.parquet","partitionValues":{"part":"2025-01-02"},"size":437,"modificationTime":1738897245000,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"v\":\"3\"},\"maxValues\":{\"v\":\"3\"},\"nullCount\":{\"v\":0},\"tightBounds\":true}"}} | ||
{"add":{"path":"part=2025-01-02/part-00003-f36390a2-b4e4-4d4b-b2a0-3d453ce0ae7d.c000.snappy.parquet","partitionValues":{"part":"2025-01-02"},"size":437,"modificationTime":1738897245000,"dataChange":true,"stats":"{\"numRecords\":1,\"minValues\":{\"v\":\"4\"},\"maxValues\":{\"v\":\"4\"},\"nullCount\":{\"v\":0},\"tightBounds\":true}"}} |
7 changes: 7 additions & 0 deletions
7
...ake/p_type_deletion_vectors/p_deletion_vector_source/_delta_log/00000000000000000002.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,7 @@ | ||
{"commitInfo":{"timestamp":1738897298789,"operation":"OPTIMIZE","operationParameters":{"predicate":"[]","zOrderBy":"[]","clusterBy":"[]","auto":false},"readVersion":1,"isolationLevel":"SnapshotIsolation","isBlindAppend":false,"operationMetrics":{"numRemovedFiles":"4","numRemovedBytes":"1748","p25FileSize":"436","numDeletionVectorsRemoved":"0","minFileSize":"436","numAddedFiles":"2","maxFileSize":"436","p75FileSize":"436","p50FileSize":"436","numAddedBytes":"872"},"engineInfo":"Apache-Spark/3.5.3 Delta-Lake/3.3.0","txnId":"1c7572ad-54e8-4577-ad73-9823b056e964"}} | ||
{"add":{"path":"part=2025-01-01/part-00000-b402fe5d-d2d9-461e-845c-67519cc5e5b7.c000.snappy.parquet","partitionValues":{"part":"2025-01-01"},"size":436,"modificationTime":1738897298000,"dataChange":false,"stats":"{\"numRecords\":2,\"minValues\":{\"v\":\"1\"},\"maxValues\":{\"v\":\"2\"},\"nullCount\":{\"v\":0},\"tightBounds\":true}"}} | ||
{"remove":{"path":"part=2025-01-01/part-00001-ebe34a24-f74d-4361-862f-c0f893baa5ab.c000.snappy.parquet","deletionTimestamp":1738897297138,"dataChange":false,"extendedFileMetadata":true,"partitionValues":{"part":"2025-01-01"},"size":437,"stats":"{\"numRecords\":1}"}} | ||
{"remove":{"path":"part=2025-01-01/part-00000-8e4bc0e0-50bb-4d9b-b938-87a1f3db8fdc.c000.snappy.parquet","deletionTimestamp":1738897297138,"dataChange":false,"extendedFileMetadata":true,"partitionValues":{"part":"2025-01-01"},"size":437,"stats":"{\"numRecords\":1}"}} | ||
{"add":{"path":"part=2025-01-02/part-00000-088e57c5-0719-4c6e-9f74-2200eefbf737.c000.snappy.parquet","partitionValues":{"part":"2025-01-02"},"size":436,"modificationTime":1738897298000,"dataChange":false,"stats":"{\"numRecords\":2,\"minValues\":{\"v\":\"3\"},\"maxValues\":{\"v\":\"4\"},\"nullCount\":{\"v\":0},\"tightBounds\":true}"}} | ||
{"remove":{"path":"part=2025-01-02/part-00003-f36390a2-b4e4-4d4b-b2a0-3d453ce0ae7d.c000.snappy.parquet","deletionTimestamp":1738897297138,"dataChange":false,"extendedFileMetadata":true,"partitionValues":{"part":"2025-01-02"},"size":437,"stats":"{\"numRecords\":1}"}} | ||
{"remove":{"path":"part=2025-01-02/part-00002-a6d9f5d1-4c7e-41f4-b5b8-4d7b7c59d283.c000.snappy.parquet","deletionTimestamp":1738897297138,"dataChange":false,"extendedFileMetadata":true,"partitionValues":{"part":"2025-01-02"},"size":437,"stats":"{\"numRecords\":1}"}} |
5 changes: 5 additions & 0 deletions
5
...ake/p_type_deletion_vectors/p_deletion_vector_source/_delta_log/00000000000000000003.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,5 @@ | ||
{"commitInfo":{"timestamp":1738897338914,"operation":"DELETE","operationParameters":{"predicate":"[\"v#1771 IN (2,3)\"]"},"readVersion":2,"isolationLevel":"Serializable","isBlindAppend":false,"operationMetrics":{"numRemovedFiles":"0","numRemovedBytes":"0","numCopiedRows":"0","numDeletionVectorsAdded":"2","numDeletionVectorsRemoved":"0","numAddedChangeFiles":"0","executionTimeMs":"2799","numDeletionVectorsUpdated":"0","numDeletedRows":"2","scanTimeMs":"0","numAddedFiles":"0","numAddedBytes":"0","rewriteTimeMs":"0"},"engineInfo":"Apache-Spark/3.5.3 Delta-Lake/3.3.0","txnId":"0814ad98-ba9f-4619-bc03-3585c4a2e0f3"}} | ||
{"add":{"path":"part=2025-01-02/part-00000-088e57c5-0719-4c6e-9f74-2200eefbf737.c000.snappy.parquet","partitionValues":{"part":"2025-01-02"},"size":436,"modificationTime":1738897298000,"dataChange":true,"stats":"{\"numRecords\":2,\"minValues\":{\"v\":\"3\"},\"maxValues\":{\"v\":\"4\"},\"nullCount\":{\"v\":0},\"tightBounds\":false}","deletionVector":{"storageType":"u","pathOrInlineDv":"TL+sAzJ^ESZS05vUA%oo","offset":1,"sizeInBytes":34,"cardinality":1}}} | ||
{"add":{"path":"part=2025-01-01/part-00000-b402fe5d-d2d9-461e-845c-67519cc5e5b7.c000.snappy.parquet","partitionValues":{"part":"2025-01-01"},"size":436,"modificationTime":1738897298000,"dataChange":true,"stats":"{\"numRecords\":2,\"minValues\":{\"v\":\"1\"},\"maxValues\":{\"v\":\"2\"},\"nullCount\":{\"v\":0},\"tightBounds\":false}","deletionVector":{"storageType":"u","pathOrInlineDv":"TL+sAzJ^ESZS05vUA%oo","offset":43,"sizeInBytes":34,"cardinality":1}}} | ||
{"remove":{"path":"part=2025-01-02/part-00000-088e57c5-0719-4c6e-9f74-2200eefbf737.c000.snappy.parquet","deletionTimestamp":1738897338470,"dataChange":true,"extendedFileMetadata":true,"partitionValues":{"part":"2025-01-02"},"size":436,"stats":"{\"numRecords\":2}"}} | ||
{"remove":{"path":"part=2025-01-01/part-00000-b402fe5d-d2d9-461e-845c-67519cc5e5b7.c000.snappy.parquet","deletionTimestamp":1738897338470,"dataChange":true,"extendedFileMetadata":true,"partitionValues":{"part":"2025-01-01"},"size":436,"stats":"{\"numRecords\":2}"}} |
Binary file added
BIN
+85 Bytes
...vectors/p_deletion_vector_source/deletion_vector_ace02373-6e93-4445-bfc5-a5f3af97725e.bin
Binary file not shown.
Binary file added
BIN
+437 Bytes
...ource/part=2025-01-01/part-00000-8e4bc0e0-50bb-4d9b-b938-87a1f3db8fdc.c000.snappy.parquet
Binary file not shown.
Binary file added
BIN
+436 Bytes
...ource/part=2025-01-01/part-00000-b402fe5d-d2d9-461e-845c-67519cc5e5b7.c000.snappy.parquet
Binary file not shown.
Binary file added
BIN
+437 Bytes
...ource/part=2025-01-01/part-00001-ebe34a24-f74d-4361-862f-c0f893baa5ab.c000.snappy.parquet
Binary file not shown.
Binary file added
BIN
+436 Bytes
...ource/part=2025-01-02/part-00000-088e57c5-0719-4c6e-9f74-2200eefbf737.c000.snappy.parquet
Binary file not shown.
Binary file added
BIN
+437 Bytes
...ource/part=2025-01-02/part-00002-a6d9f5d1-4c7e-41f4-b5b8-4d7b7c59d283.c000.snappy.parquet
Binary file not shown.
Binary file added
BIN
+437 Bytes
...ource/part=2025-01-02/part-00003-f36390a2-b4e4-4d4b-b2a0-3d453ce0ae7d.c000.snappy.parquet
Binary file not shown.