Skip to content

Commit

Permalink
StructTypeInner::unqualified_name never read
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangjinwu committed Nov 22, 2024
1 parent 55e50cc commit 78aa067
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/common/src/types/struct_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ impl Debug for StructType {
}
}

#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[derive(Debug, educe::Educe)]
#[educe(PartialEq, Eq, PartialOrd, Ord, Hash)]
struct StructTypeInner {
/// Details about a struct type. There are 2 cases for a struct:
/// 1. `field_names.len() == field_types.len()`: it represents a struct with named fields,
Expand All @@ -44,6 +45,10 @@ struct StructTypeInner {
/// e.g. `ROW(1, 2)`.
field_names: Box<[String]>,
field_types: Box<[DataType]>,
#[educe(PartialEq(ignore))]
#[educe(Ord(ignore))]
#[educe(Hash(ignore))]
unqualified_name: Option<Box<str>>,
}

impl StructType {
Expand All @@ -58,6 +63,7 @@ impl StructType {
Self(Arc::new(StructTypeInner {
field_types: field_types.into(),
field_names: field_names.into(),
unqualified_name: None,
}))
}

Expand All @@ -67,6 +73,7 @@ impl StructType {
Self(Arc::new(StructTypeInner {
field_types: Box::new([]),
field_names: Box::new([]),
unqualified_name: None,
}))
}

Expand All @@ -76,6 +83,7 @@ impl StructType {
Self(Arc::new(StructTypeInner {
field_types: field_types.into(),
field_names: field_names.into(),
unqualified_name: None,
}))
}

Expand All @@ -84,6 +92,7 @@ impl StructType {
Self(Arc::new(StructTypeInner {
field_types: fields.into(),
field_names: Box::new([]),
unqualified_name: None,
}))
}

Expand Down Expand Up @@ -172,6 +181,7 @@ impl FromStr for StructType {
Ok(Self(Arc::new(StructTypeInner {
field_types: field_types.into(),
field_names: field_names.into(),
unqualified_name: None,
})))
}
}

0 comments on commit 78aa067

Please sign in to comment.