Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index the partitionValues map with column's physical name #278

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions kernel/src/scan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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, Error>(Expression::Literal(value_expression))
Expand Down Expand Up @@ -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, Error>(Expression::Literal(value_expression))
Expand Down
Loading