Skip to content

Commit ee598bb

Browse files
committed
refactor(cubesql): Rename cubesql_disable_post_processing session var to cubesql_penalize_post_processing
1 parent 02c0bab commit ee598bb

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/cubejs-backend-native/src/sql4sql.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use cubesql::compile::datafusion::variable::VarType;
88
use cubesql::compile::engine::df::scan::CubeScanNode;
99
use cubesql::compile::engine::df::wrapper::{CubeScanWrappedSqlNode, CubeScanWrapperNode};
1010
use cubesql::compile::{convert_sql_to_cube_query, DatabaseVariable};
11-
use cubesql::sql::{Session, CUBESQL_DISABLE_POST_PROCESSING_VAR};
11+
use cubesql::sql::{Session, CUBESQL_PENALIZE_POST_PROCESSING_VAR};
1212
use cubesql::transport::MetaContext;
1313
use cubesql::CubeError;
1414

@@ -164,7 +164,7 @@ async fn handle_sql4sql_query(
164164
with_session(&services, native_auth_ctx.clone(), |session| async move {
165165
if disable_post_processing {
166166
let v = DatabaseVariable {
167-
name: CUBESQL_DISABLE_POST_PROCESSING_VAR.to_string(),
167+
name: CUBESQL_PENALIZE_POST_PROCESSING_VAR.to_string(),
168168
value: ScalarValue::Boolean(Some(true)),
169169
var_type: VarType::UserDefined,
170170
readonly: false,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use crate::{
1515
CubeContext,
1616
},
1717
config::ConfigObj,
18-
sql::database_variables::postgres::session_vars::CUBESQL_DISABLE_POST_PROCESSING_VAR,
18+
sql::database_variables::postgres::session_vars::CUBESQL_PENALIZE_POST_PROCESSING_VAR,
1919
sql::{compiler_cache::CompilerCacheEntry, AuthContextRef},
2020
transport::{MetaContext, SpanId},
2121
CubeError,
@@ -348,7 +348,7 @@ impl Rewriter {
348348
let penalize_post_processing = self
349349
.cube_context
350350
.session_state
351-
.get_variable(CUBESQL_DISABLE_POST_PROCESSING_VAR)
351+
.get_variable(CUBESQL_PENALIZE_POST_PROCESSING_VAR)
352352
.map(|v| v.value);
353353
let penalize_post_processing = match penalize_post_processing {
354354
Some(ScalarValue::Boolean(val)) => val.unwrap_or(false),

rust/cubesql/cubesql/src/sql/database_variables/postgres/session_vars.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use datafusion::scalar::ScalarValue;
22

33
use crate::compile::{DatabaseVariable, DatabaseVariables};
44

5-
pub const CUBESQL_DISABLE_POST_PROCESSING_VAR: &str = "cubesql_disable_post_processing";
5+
pub const CUBESQL_PENALIZE_POST_PROCESSING_VAR: &str = "cubesql_penalize_post_processing";
66

77
pub fn defaults() -> DatabaseVariables {
88
let variables = [
@@ -63,7 +63,7 @@ pub fn defaults() -> DatabaseVariables {
6363
),
6464
// Custom cubesql variables
6565
DatabaseVariable::user_defined(
66-
CUBESQL_DISABLE_POST_PROCESSING_VAR.to_string(),
66+
CUBESQL_PENALIZE_POST_PROCESSING_VAR.to_string(),
6767
ScalarValue::Boolean(Some(false)),
6868
None,
6969
),

rust/cubesql/cubesql/src/sql/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub use auth_service::{
1515
AuthContext, AuthContextRef, AuthenticateResponse, HttpAuthContext, SqlAuthDefaultImpl,
1616
SqlAuthService,
1717
};
18-
pub use database_variables::postgres::session_vars::CUBESQL_DISABLE_POST_PROCESSING_VAR;
18+
pub use database_variables::postgres::session_vars::CUBESQL_PENALIZE_POST_PROCESSING_VAR;
1919
pub use postgres::*;
2020
pub use server_manager::ServerManager;
2121
pub use session::{Session, SessionProcessList, SessionProperties, SessionState};

0 commit comments

Comments
 (0)