Skip to content

Commit c44311a

Browse files
committed
refine name
1 parent e858d18 commit c44311a

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

crates/iceberg/src/arrow/reader.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ impl ArrowReader {
384384
});
385385

386386
if column_map.len() != leaf_field_ids.len() {
387-
let miss_field = leaf_field_ids
387+
let missing_fields = leaf_field_ids
388388
.iter()
389389
.filter(|field_id| !column_map.contains_key(field_id))
390390
.collect::<Vec<_>>();
@@ -397,7 +397,7 @@ impl ArrowReader {
397397
)
398398
.with_context("column_map", format! {"{:?}", column_map})
399399
.with_context("field_ids", format! {"{:?}", leaf_field_ids})
400-
.with_context("miss_field", format! {"{:?}", miss_field}));
400+
.with_context("missing_fields", format! {"{:?}", missing_fields}));
401401
}
402402

403403
let mut indices = vec![];

crates/iceberg/src/spec/datatypes.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use crate::spec::datatypes::_decimal::{MAX_PRECISION, REQUIRED_LENGTH};
3636
use crate::spec::PrimitiveLiteral;
3737

3838
/// Field name for list type.
39-
pub const LIST_FILED_NAME: &str = "element";
39+
pub const LIST_FIELD_NAME: &str = "element";
4040
/// Field name for map type's key.
4141
pub const MAP_KEY_FIELD_NAME: &str = "key";
4242
/// Field name for map type's value.
@@ -635,9 +635,9 @@ impl NestedField {
635635
/// Construct list type's element field.
636636
pub fn list_element(id: i32, field_type: Type, required: bool) -> Self {
637637
if required {
638-
Self::required(id, LIST_FILED_NAME, field_type)
638+
Self::required(id, LIST_FIELD_NAME, field_type)
639639
} else {
640-
Self::optional(id, LIST_FILED_NAME, field_type)
640+
Self::optional(id, LIST_FIELD_NAME, field_type)
641641
}
642642
}
643643

crates/iceberg/src/spec/schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use super::NestedField;
3030
use crate::error::Result;
3131
use crate::expr::accessor::StructAccessor;
3232
use crate::spec::datatypes::{
33-
ListType, MapType, NestedFieldRef, PrimitiveType, StructType, Type, LIST_FILED_NAME,
33+
ListType, MapType, NestedFieldRef, PrimitiveType, StructType, Type, LIST_FIELD_NAME,
3434
MAP_KEY_FIELD_NAME, MAP_VALUE_FIELD_NAME,
3535
};
3636
use crate::{ensure_data_valid, Error, ErrorKind};
@@ -774,7 +774,7 @@ impl SchemaVisitor for IndexByName {
774774
}
775775

776776
fn list(&mut self, list: &ListType, _value: Self::T) -> Result<Self::T> {
777-
self.add_field(LIST_FILED_NAME, list.element_field.id)
777+
self.add_field(LIST_FIELD_NAME, list.element_field.id)
778778
}
779779

780780
fn map(&mut self, map: &MapType, _key_value: Self::T, _value: Self::T) -> Result<Self::T> {

crates/integration_tests/tests/scan_all_type.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use arrow_schema::{DataType, Field, Fields};
3030
use futures::TryStreamExt;
3131
use iceberg::arrow::{DEFAULT_MAP_FIELD_NAME, UTC_TIME_ZONE};
3232
use iceberg::spec::{
33-
ListType, MapType, NestedField, PrimitiveType, Schema, StructType, Type, LIST_FILED_NAME,
33+
ListType, MapType, NestedField, PrimitiveType, Schema, StructType, Type, LIST_FIELD_NAME,
3434
MAP_KEY_FIELD_NAME, MAP_VALUE_FIELD_NAME,
3535
};
3636
use iceberg::transaction::Transaction;
@@ -240,7 +240,7 @@ async fn test_scan_all_type() {
240240
]);
241241
let col16 = {
242242
let mut builder = ListBuilder::new(Int32Builder::new()).with_field(Arc::new(
243-
Field::new(LIST_FILED_NAME, DataType::Int32, false).with_metadata(HashMap::from([(
243+
Field::new(LIST_FIELD_NAME, DataType::Int32, false).with_metadata(HashMap::from([(
244244
PARQUET_FIELD_ID_META_KEY.to_string(),
245245
20.to_string(),
246246
)])),

0 commit comments

Comments
 (0)