Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
victoria de sainte agathe committed Dec 4, 2023
1 parent 137c819 commit f4269bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.5.3] - 2023-12-02
## Changed
- some cleaning in the translation of Expr -> ast::Expr [#204](https://github.com/Qrlew/qrlew/issues/204)
- `Expr::filter_by_function`: if the filtered datatype cannot be determined, keep the original data [#206](https://github.com/Qrlew/qrlew/issues/206)
## Added
- implemented Public -> Synthetic rewritting rule for table [#206](https://github.com/Qrlew/qrlew/issues/206)
- implemented `BETWEEN`, `IS TRUE`, `IS FALSE`, `IS NULL`, `CHOOSE`, `LIKE` and `ILIKE` [#203](https://github.com/Qrlew/qrlew/issues/203)
- implemented `DAYNAME`, `FROM_UNIXTIME`, `UNIX_TIMESTAMP`, `DATETIME_DIFF`, `QUARTER` and `DATE_FORMAT` [#202](https://github.com/Qrlew/qrlew/issues/202)
- implemented `CURRENT_DATE`, `CURRENT_TIME`, `CURRENT_TIMESTAMP` and `EXTRACT(datepart FROM col)` [#200](https://github.com/Qrlew/qrlew/issues/200)
Expand Down
16 changes: 8 additions & 8 deletions src/expr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1427,14 +1427,14 @@ impl DataType {
}
},
(function::Function::Eq, [left, right]) => {
let left_dt = left.super_image(&datatype).unwrap();
let right_dt = right.super_image(&datatype).unwrap();
let dt = left_dt.super_intersection(&right_dt).unwrap();
if let Expr::Column(col) = left {
datatype = datatype.replace(&col, dt.clone())
}
if let Expr::Column(col) = right {
datatype = datatype.replace(&col, dt)
if let (Ok(left_dt), Ok(right_dt)) = (left.super_image(&datatype), right.super_image(&datatype)) {
let dt = left_dt.super_intersection(&right_dt).unwrap();
if let Expr::Column(col) = left {
datatype = datatype.replace(&col, dt.clone())
}
if let Expr::Column(col) = right {
datatype = datatype.replace(&col, dt)
}
}
}
(function::Function::InList, [Expr::Column(col), Expr::Value(Value::List(l))]) => {
Expand Down

0 comments on commit f4269bc

Please sign in to comment.