Skip to content

Commit

Permalink
Add Iceberg test fixture with local FS-based metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
gruuya committed Nov 22, 2024
1 parent c3b8fdc commit b0804d6
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ deltalake = { git = "https://github.com/splitgraph/delta-rs", branch = "fix-deci
futures = "0.3"
hex = ">=0.4.0"

iceberg-datafusion = { git = "https://github.com/apache/iceberg-rust", rev = "697a20060f2247da87f73073e8bf5ab407bd40ea" }
iceberg-datafusion = { git = "https://github.com/splitgraph/iceberg-rust", branch = "local-fs-relative-paths" }
indexmap = "2.6.0"
itertools = { workspace = true }

Expand Down
Binary file added tests/data/iceberg/iceberg_catalog.db
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"location":"./tests/data/iceberg/tables/default.db/iceberg_table","table-uuid":"947a7591-1a17-4652-bf6d-4e8846859b16","last-updated-ms":1732203587244,"last-column-id":2,"schemas":[{"type":"struct","fields":[{"id":1,"name":"key","type":"int","required":true},{"id":2,"name":"value","type":"string","required":true}],"schema-id":0,"identifier-field-ids":[]}],"current-schema-id":0,"partition-specs":[{"spec-id":0,"fields":[]}],"default-spec-id":0,"last-partition-id":999,"properties":{},"snapshots":[],"snapshot-log":[],"metadata-log":[],"sort-orders":[{"order-id":0,"fields":[]}],"default-sort-order-id":0,"refs":{},"format-version":2,"last-sequence-number":0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"location":"./tests/data/iceberg/tables/default.db/iceberg_table","table-uuid":"947a7591-1a17-4652-bf6d-4e8846859b16","last-updated-ms":1732203587585,"last-column-id":2,"schemas":[{"type":"struct","fields":[{"id":1,"name":"key","type":"int","required":true},{"id":2,"name":"value","type":"string","required":true}],"schema-id":0,"identifier-field-ids":[]}],"current-schema-id":0,"partition-specs":[{"spec-id":0,"fields":[]}],"default-spec-id":0,"last-partition-id":999,"properties":{},"current-snapshot-id":3900553047169985566,"snapshots":[{"snapshot-id":3900553047169985566,"sequence-number":1,"timestamp-ms":1732203587585,"manifest-list":"./tests/data/iceberg/tables/default.db/iceberg_table/metadata/snap-3900553047169985566-0-77a60cb6-87e7-4727-927c-f037613791ce.avro","summary":{"operation":"append","added-files-size":"1037","added-data-files":"1","added-records":"4","total-data-files":"1","total-delete-files":"0","total-records":"4","total-files-size":"1037","total-position-deletes":"0","total-equality-deletes":"0"},"schema-id":0}],"snapshot-log":[{"snapshot-id":3900553047169985566,"timestamp-ms":1732203587585}],"metadata-log":[],"sort-orders":[{"order-id":0,"fields":[]}],"default-sort-order-id":0,"refs":{"main":{"snapshot-id":3900553047169985566,"type":"branch"}},"format-version":2,"last-sequence-number":1}
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions tests/statements/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ async fn test_delta_tables() {
assert_batches_eq!(expected, &results);
}

#[ignore]
#[tokio::test]
async fn test_iceberg_tables() {
let (context, _) = make_context_with_pg(ObjectStoreType::InMemory).await;
Expand All @@ -379,7 +378,7 @@ async fn test_iceberg_tables() {
.plan_query(
"CREATE EXTERNAL TABLE test_iceberg \
STORED AS ICEBERG \
LOCATION '/Users/gruuya/Splitgraph/seafowl/tests/data/iceberg/tables/default.db/iceberg_table/metadata/00001-8f13a2db-1fe2-4679-94b1-3b6e5fa49e51.metadata.json'",
LOCATION 'tests/data/iceberg/tables/default.db/iceberg_table/metadata/00001-f18ddde7-9d9d-40e0-9778-d346b5bb7393.metadata.json'",
)
.await
.unwrap();
Expand Down

0 comments on commit b0804d6

Please sign in to comment.