Skip to content

Commit f3678b0

Browse files
committed
Handle LogicalTypeId::Unsupported in more places
1 parent 7b6fe67 commit f3678b0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/duckdb/src/core/logical_type.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ impl Debug for LogicalTypeHandle {
157157
let id = self.id();
158158
match id {
159159
LogicalTypeId::Invalid => write!(f, "Invalid"),
160+
LogicalTypeId::Unsupported => write!(f, "Unsupported({})", self.raw_id()),
160161
LogicalTypeId::Struct => {
161162
write!(f, "struct<")?;
162163
for i in 0..self.num_children() {
@@ -313,6 +314,7 @@ impl LogicalTypeHandle {
313314
let child_name_ptr = match self.id() {
314315
LogicalTypeId::Struct => duckdb_struct_type_child_name(self.ptr, idx as u64),
315316
LogicalTypeId::Union => duckdb_union_type_member_name(self.ptr, idx as u64),
317+
LogicalTypeId::Unsupported => panic!("unsupported logical type {}", self.raw_id()),
316318
_ => panic!("not a struct or union"),
317319
};
318320
let c_str = CString::from_raw(child_name_ptr);
@@ -328,6 +330,7 @@ impl LogicalTypeHandle {
328330
LogicalTypeId::Struct => duckdb_struct_type_child_type(self.ptr, idx as u64),
329331
LogicalTypeId::Union => duckdb_union_type_member_type(self.ptr, idx as u64),
330332
LogicalTypeId::Array => duckdb_array_type_child_type(self.ptr),
333+
LogicalTypeId::Unsupported => panic!("unsupported logical type {}", self.raw_id()),
331334
_ => panic!("not a struct, union, or array"),
332335
}
333336
};

0 commit comments

Comments
 (0)