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 Dec 13, 2024
1 parent c3c6f66 commit edfcb38
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 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 @@ -59,6 +64,7 @@ impl StructType {
Self(Arc::new(StructTypeInner {
field_types: field_types.into(),
field_names: field_names.into(),
unqualified_name: None,
}))
}

Expand All @@ -68,6 +74,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: fields.into(),
field_names: Box::new([]),
unqualified_name: None,
}))
}

Expand Down Expand Up @@ -164,6 +172,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 edfcb38

Please sign in to comment.