Skip to content

Commit

Permalink
fix(cubesql): Fix unary minus operator precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
MazterQyou committed Jan 22, 2024
1 parent 4746fc9 commit 1a66d97
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions packages/cubejs-backend-native/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions rust/cubesql/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rust/cubesql/cubesql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ homepage = "https://cube.dev"

[dependencies]
arc-swap = "1"
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "dc15ce71abc4b4a2a41a1c149afc8b293027c49f", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "208a6889c6067b760c6cc2775036570c30a086b5", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
anyhow = "1.0"
thiserror = "1.0.50"
cubeclient = { path = "../cubeclient" }
pg-srv = { path = "../pg-srv" }
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "2c1becf622f2283514ecbb7e3f01bd858edeaa71" }
sqlparser = { git = 'https://github.com/cube-js/sqlparser-rs.git', rev = "dca8d9081fd8ad7c01302c112d204edc74e67170" }
lazy_static = "1.4.0"
base64 = "0.13.0"
tokio = { version = "^1.35", features = ["full", "rt", "tracing"] }
Expand Down
8 changes: 4 additions & 4 deletions rust/cubesql/cubesql/src/compile/rewrite/rules/dates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ impl RewriteRules for DateRules {
"?date_trunc_alias",
),
"+",
negative_expr(binary_expr(
fun_expr(
binary_expr(
negative_expr(fun_expr(
"DatePart",
vec![literal_string("DOW"), column_expr("?column")],
),
)),
"*",
// TODO match
literal_expr("?interval_one_day"),
)),
),
),
alias_expr(
fun_expr(
Expand Down

0 comments on commit 1a66d97

Please sign in to comment.