feniljain opened a new issue, #1039: URL: https://github.com/apache/iceberg-rust/issues/1039
### Apache Iceberg Rust version 0.4.0 (latest version) ### Describe the bug I was trying to debug a failing test I wrote for nan value count PR, and realized name of primitive column inside list arrow type is changed and test was failing due to this reason. On further debugging, realized we use "[element](https://github.com/apache/iceberg-rust/blob/2bc03c28268f15472353b828602bb5efd3bf9513/crates/iceberg/src/spec/datatypes.rs#L39)" constant name here. Same seems to be the case for map type too: - [constant names](https://github.com/apache/iceberg-rust/blob/2bc03c28268f15472353b828602bb5efd3bf9513/crates/iceberg/src/spec/datatypes.rs#L40-L43) - [usage](https://github.com/apache/iceberg-rust/blob/2bc03c28268f15472353b828602bb5efd3bf9513/crates/iceberg/src/spec/datatypes.rs#L645-L656) One doubt I have is it worth fixing? Is it okay to write tests with hardcoded names? Can it break anything for external consumers? ### To Reproduce Test to reproduce: file: `arrow/schema.rs` test: ```rust #[test] fn test_arrow_schema_to_schema_list() { let schema_list_float_field = Field::new("col1", DataType::Float32, true).with_metadata( HashMap::from([(PARQUET_FIELD_ID_META_KEY.to_string(), "1".to_string())]), ); let arrow_schema = { let fields = vec![Field::new_list( "col0", schema_list_float_field.clone(), true, ) .with_metadata(HashMap::from([( PARQUET_FIELD_ID_META_KEY.to_string(), "0".to_string(), )]))]; Arc::new(arrow_schema::Schema::new(fields)) }; let converted_schema = arrow_schema_to_schema(&arrow_schema).expect("Could not convert to iceberg schema"); assert_eq!(converted_schema.field_by_id(1).unwrap().name, String::from("col1")); } ``` ### Expected behavior Above test should pass :) ### Willingness to contribute - [x] I can contribute a fix for this bug independently - [ ] I would be willing to contribute a fix for this bug with guidance from the Iceberg community - [ ] I cannot contribute a fix for this bug at this time -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org