Is this a bug? #1051
Is this a bug?
#1051
-
use std::sync::Arc;
use arrow::datatype::{DataType, Field, Schema}; // 53.4.0
use iceberg::arrow::arrow_schema_to_schema; // "0.4.0"
fn main() -> Result<(), Box<dyn std::error::Error>> {
let arrow_schema = Arc::new(Schema::new(vec![
Field::new("id", DataType::Int32, false),
Field::new("name", DataType::Utf8, false),
]));
let iceberg_schema = arrow_schema_to_schema(arrow_schema)?;
} Running the above code returns: Am I doing something wrong or is this a bug? |
Beta Was this translation helpful? Give feedback.
Answered by
liurenjie1024
Mar 8, 2025
Replies: 2 comments
-
Hi, @de-sh This is not a bug. Iceberg schema's field requires a field id, so when converting from arrow schema to iceberg schema, it expects that arrow field stores a field id in metadata, see |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
de-sh
-
Thanks, this requirement was not clear to us! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, @de-sh This is not a bug. Iceberg schema's field requires a field id, so when converting from arrow schema to iceberg schema, it expects that arrow field stores a field id in metadata, see
iceberg-rust/crates/iceberg/src/arrow/schema.rs
Line 229 in 3ac0651