Skip to content

Commit e1a8e8d

Browse files
authored
feat: Enable CUBESQL_SQL_PUSH_DOWN by default (#8814)
BREAKING CHANGE: Enabling `CUBESQL_SQL_PUSH_DOWN` is backward incompatible to many default behaviors of SQL API
1 parent 5a4f467 commit e1a8e8d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/cubejs-backend-shared/src/env.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,7 @@ const variables: Record<string, (...args: any) => any> = {
16331633
.asInt(),
16341634

16351635
allowUngroupedWithoutPrimaryKey: () => get('CUBEJS_ALLOW_UNGROUPED_WITHOUT_PRIMARY_KEY')
1636-
.default(get('CUBESQL_SQL_PUSH_DOWN').default('false').asString())
1636+
.default(get('CUBESQL_SQL_PUSH_DOWN').default('true').asString())
16371637
.asBoolStrict(),
16381638
nodeEnv: () => get('NODE_ENV')
16391639
.asString(),

rust/cubesql/cubesql/src/compile/rewrite/rewriter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ impl Rewriter {
498498
pub fn sql_push_down_enabled() -> bool {
499499
env::var("CUBESQL_SQL_PUSH_DOWN")
500500
.map(|v| v.to_lowercase() == "true")
501-
.unwrap_or(false)
501+
.unwrap_or(true)
502502
}
503503

504504
pub fn rewrite_rules(

rust/cubesql/cubesql/src/config/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ impl ConfigObjImpl {
143143
.ok()
144144
.map(|v| v.parse::<u64>().unwrap())
145145
.unwrap_or(120);
146-
let sql_push_down = env_parse("CUBESQL_SQL_PUSH_DOWN", false);
146+
let sql_push_down = env_parse("CUBESQL_SQL_PUSH_DOWN", true);
147147
Self {
148148
bind_address: env::var("CUBESQL_BIND_ADDR").ok().or_else(|| {
149149
env::var("CUBESQL_PORT")

0 commit comments

Comments
 (0)