Skip to content

Commit

Permalink
fix(cubesql): Fix push down column remapping
Browse files Browse the repository at this point in the history
  • Loading branch information
MazterQyou committed Mar 10, 2024
1 parent cd67a7c commit c7736cc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion rust/cubesql/cubesql/src/compile/engine/df/wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,10 +901,19 @@ impl CubeScanWrapperNode {
};
if !next_remapping.contains_key(&Column::from_name(&alias)) {
next_remapping.insert(original_alias_key, Column::from_name(&alias));
let original_relation = if let Expr::Column(column) = &original_expr {
if column.relation.is_some() {
&column.relation
} else {
&from_alias
}
} else {
&from_alias
};
next_remapping.insert(
Column {
name: original_alias.clone(),
relation: from_alias.clone(),
relation: original_relation.clone(),
},
Column {
name: alias.clone(),
Expand Down

0 comments on commit c7736cc

Please sign in to comment.