Skip to content

Commit

Permalink
handle nested struct in schemaString (#257)
Browse files Browse the repository at this point in the history
Handle parsing nested structs in `schemaString`. Setting iceberg compat
causes this. Also enable the iceberg_compat_v1 test for dat, since we do
now support column mapping.

Closes #253 .
  • Loading branch information
nicklan authored Jun 21, 2024
1 parent 6f95fd3 commit be69dcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 1 addition & 3 deletions acceptance/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,7 @@ pub fn sort_record_batch(batch: RecordBatch) -> DeltaResult<RecordBatch> {
Ok(RecordBatch::try_new(batch.schema(), columns)?)
}

static SKIPPED_TESTS: &[&str; 2] = &[
// iceberg compat requires column mapping
"iceberg_compat_v1",
static SKIPPED_TESTS: &[&str; 1] = &[
// For multi_partitioned_2: The golden table stores the timestamp as an INT96 (which is
// nanosecond precision), while the spec says we should read partition columns as
// microseconds. This means the read and golden data don't line up. When this is released in
Expand Down
5 changes: 5 additions & 0 deletions kernel/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ pub enum MetadataValue {
Number(i32),
String(String),
Boolean(bool),
// The [PROTOCOL](https://github.com/delta-io/delta/blob/master/PROTOCOL.md#struct-field) states
// only that the metadata is "A JSON map containing information about this column.", so we can
// actually have any valid json here. `Other` is therefore a catchall for things we don't need
// to handle.
Other(serde_json::Value),
}

impl From<String> for MetadataValue {
Expand Down

0 comments on commit be69dcf

Please sign in to comment.