From 77676169b5e0d30bc1cb879a71fd8edf6c1d2d2c Mon Sep 17 00:00:00 2001 From: Nick Lanham Date: Thu, 11 Jul 2024 16:49:41 -0700 Subject: [PATCH] turns out we need to use the physical name --- kernel/src/scan/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/src/scan/mod.rs b/kernel/src/scan/mod.rs index 63bcb8a27..0bb5a6d05 100644 --- a/kernel/src/scan/mod.rs +++ b/kernel/src/scan/mod.rs @@ -288,8 +288,9 @@ impl Scan { let field = self.logical_schema.fields.get_index(*field_idx).ok_or_else(|| { Error::generic("logical schema did not contain expected field, can't execute scan") })?.1; + let name = field.physical_name(self.snapshot.column_mapping_mode)?; let value_expression = parse_partition_value( - add.partition_values.get(field.name()), + add.partition_values.get(name), field.data_type(), )?; Ok::(Expression::Literal(value_expression)) @@ -462,8 +463,9 @@ pub fn transform_to_logical( .ok_or_else(|| { Error::generic("logical schema did not contain expected field, can't transform data") })?.1; + let name = field.physical_name(global_state.column_mapping_mode)?; let value_expression = parse_partition_value( - partition_values.get(field.name()), + partition_values.get(name), field.data_type(), )?; Ok::(Expression::Literal(value_expression))