Skip to content

Commit

Permalink
fix(cubesql): Stabilize split operations for SQL push down (#7725)
Browse files Browse the repository at this point in the history
* fix(cubesql): Stabilize split operations for SQL push down

* More split cases support and test fixes

* Final test fixes

* Match old and new split

* Fix linter

* Failing @azure/core-util Node 18

* Failing @azure/core-util Node 18

* Failing @azure/core-util Node 18: merge prod_dependencies

* Failing @azure/core-util Node 18: merge prod_dependencies

* Failing @azure/core-util Node 18: merge prod_dependencies

* Env variables

* Update bench rewrite rules to match production

* Add trivial push down rules

* Add alias projection split rules
  • Loading branch information
paveltiunov authored Feb 11, 2024
1 parent 434f961 commit 6241e5e
Show file tree
Hide file tree
Showing 36 changed files with 3,258 additions and 655 deletions.
22 changes: 21 additions & 1 deletion packages/cubejs-backend-native/Cargo.lock

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

3 changes: 3 additions & 0 deletions packages/cubejs-databricks-jdbc-driver/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"jest": "^27",
"typescript": "~5.2.2"
},
"resolutions": {
"@azure/core-util": "1.6.1"
},
"publishConfig": {
"access": "public"
},
Expand Down
5 changes: 4 additions & 1 deletion packages/cubejs-docker/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,14 @@ RUN yarn config set network-timeout 120000 -g
# There is a problem with release process.
# We are doing version bump without updating lock files for the docker package.
#RUN yarn install --frozen-lockfile

FROM base as prod_base_dependencies
COPY packages/cubejs-databricks-jdbc-driver/package.json packages/cubejs-databricks-jdbc-driver/package.json
RUN mkdir packages/cubejs-databricks-jdbc-driver/bin
RUN echo '#!/usr/bin/env node' > packages/cubejs-databricks-jdbc-driver/bin/post-install
RUN yarn install --prod

FROM prod_base_dependencies as prod_dependencies
COPY packages/cubejs-databricks-jdbc-driver/package.json packages/cubejs-databricks-jdbc-driver/package.json
COPY packages/cubejs-databricks-jdbc-driver/bin packages/cubejs-databricks-jdbc-driver/bin
RUN yarn install --prod --ignore-scripts

Expand Down
11 changes: 4 additions & 7 deletions packages/cubejs-docker/testing-drivers.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,15 @@ RUN yarn policies set-version v1.22.19
RUN yarn config set network-timeout 120000 -g

######################################################################
# Production dependencies for all but the databricks driver #
# Databricks driver dependencies #
######################################################################
FROM base as prod_base_dependencies

COPY packages/cubejs-databricks-jdbc-driver/package.json packages/cubejs-databricks-jdbc-driver/package.json
RUN mkdir packages/cubejs-databricks-jdbc-driver/bin
RUN echo '#!/usr/bin/env node' > packages/cubejs-databricks-jdbc-driver/bin/post-install
RUN yarn install --prod

######################################################################
# Databricks driver dependencies #
######################################################################
FROM prod_base_dependencies as prod_dependencies

COPY packages/cubejs-databricks-jdbc-driver/package.json packages/cubejs-databricks-jdbc-driver/package.json
COPY packages/cubejs-databricks-jdbc-driver/bin packages/cubejs-databricks-jdbc-driver/bin
RUN yarn install --prod --ignore-scripts

Expand Down
2 changes: 2 additions & 0 deletions rust/cubesql/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ dist
node_modules
.vscode
/cubesql/egraph-debug
/cubesql/egraph-debug-final
/cubesql/egraph-debug-intermediate
egraph-debug
/cubesql/debug-qtrace
20 changes: 20 additions & 0 deletions rust/cubesql/Cargo.lock

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

1 change: 1 addition & 0 deletions rust/cubesql/cubesql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ tera = { version = "1", default-features = false }
minijinja = { version = "1", features = ["json", "loader"] }
lru = "0.12.1"
sha2 = "0.10.8"
bigdecimal = "0.4.2"


[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion rust/cubesql/cubesql/benches/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ pub fn power_bi_sum_wrap(c: &mut Criterion) {

criterion_group! {
name = benches;
config = Criterion::default().measurement_time(std::time::Duration::from_secs(30)).sample_size(10);
config = Criterion::default().measurement_time(std::time::Duration::from_secs(15)).sample_size(10);
targets = split_query, split_query_count_distinct, wrapped_query, power_bi_wrap, power_bi_sum_wrap
}
criterion_main!(benches);
3 changes: 2 additions & 1 deletion rust/cubesql/cubesql/egraph-debug-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"elkjs": "^0.9.1",
"react": "18.1.0",
"react-dom": "18.1.0",
"@antv/g6": "4.8.3"
"reactflow": "^11.10.3"
},
"scripts": {
"start": "GENERATE_SOURCEMAP=false && react-scripts start",
Expand Down
Loading

0 comments on commit 6241e5e

Please sign in to comment.