Skip to content

Commit 9fde584

Browse files
committed
chore(cubesql): Improve Thoughtspot (pg) compatibility
1 parent 8ad51a1 commit 9fde584

File tree

6 files changed

+1515
-182
lines changed

6 files changed

+1515
-182
lines changed

rust/cubesql/Cargo.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/cubesql/cubesql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ documentation = "https://cube.dev/docs"
99
homepage = "https://cube.dev"
1010

1111
[dependencies]
12-
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "fe081679aeccd25f0fdb828578439ddc86c0cd19", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
12+
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "a809c5ec3477cd941e6135e4c410bb988b8591ec", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
1313
anyhow = "1.0"
1414
thiserror = "1.0"
1515
cubeclient = { path = "../cubeclient" }

rust/cubesql/cubesql/src/compile/engine/udf.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3164,3 +3164,22 @@ pub fn create_charindex_udf() -> ScalarUDF {
31643164
&fun,
31653165
)
31663166
}
3167+
3168+
pub fn create_mod_udf() -> ScalarUDF {
3169+
let fun = make_scalar_function(move |args: &[ArrayRef]| {
3170+
assert!(args.len() == 2);
3171+
3172+
return Err(DataFusionError::NotImplemented(format!(
3173+
"mod is not implemented, it's stub"
3174+
)));
3175+
});
3176+
3177+
let return_type: ReturnTypeFunction = Arc::new(move |_| Ok(Arc::new(DataType::Int32)));
3178+
3179+
ScalarUDF::new(
3180+
"mod",
3181+
&Signature::any(2, Volatility::Immutable),
3182+
&return_type,
3183+
&fun,
3184+
)
3185+
}

0 commit comments

Comments
 (0)