Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions packages/cubejs-backend-native/Cargo.lock

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

12 changes: 6 additions & 6 deletions rust/cubenativeutils/Cargo.lock

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

12 changes: 6 additions & 6 deletions rust/cubesql/Cargo.lock

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

2 changes: 1 addition & 1 deletion rust/cubesql/cubesql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ homepage = "https://cube.dev"

[dependencies]
arc-swap = "1"
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "400fa0d889a8a38ca69f36d5750dfb572fc6018e", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "dcf3e4aa26fd112043ef26fa4a78db5dbd443c86", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
anyhow = "1.0"
thiserror = "1.0.50"
cubeclient = { path = "../cubeclient" }
Expand Down
2 changes: 2 additions & 0 deletions rust/cubesql/cubesql/src/compile/test/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ pub mod rewrite_engine;
#[cfg(test)]
pub mod test_bi_workarounds;
#[cfg(test)]
pub mod test_df_execution;
#[cfg(test)]
pub mod test_introspection;
#[cfg(test)]
pub mod test_udfs;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
source: cubesql/src/compile/test/test_df_execution.rs
expression: "execute_query(r#\"\n WITH\n t1 AS (\n SELECT 1::int2 AS i1\n ),\n t2 AS (\n SELECT 1::int4 AS i2\n )\n SELECT\n *\n FROM\n t1 LEFT JOIN t2 ON (t1.i1 = t2.i2)\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL,).await.unwrap()"
---
+----+----+
| i1 | i2 |
+----+----+
| 1 | 1 |
+----+----+
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
source: cubesql/src/compile/test/test_df_execution.rs
expression: "execute_query(r#\"\n WITH\n t1 AS (\n SELECT 1::int2 AS i1\n ),\n t2 AS (\n SELECT 1::int4 AS i2\n ),\n t3 AS (\n SELECT 1::int8 AS i3\n )\n SELECT\n *\n FROM\n t1\n LEFT JOIN t2 ON (t1.i1 = t2.i2)\n LEFT JOIN t3 ON (t3.i3 = t2.i2)\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL,).await.unwrap()"
---
+----+----+----+
| i1 | i2 | i3 |
+----+----+----+
| 1 | 1 | 1 |
+----+----+----+
63 changes: 63 additions & 0 deletions rust/cubesql/cubesql/src/compile/test/test_df_execution.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
//! Tests that validate that complex but self-contained queries can be executed correctly by DF

use crate::compile::{
test::{execute_query, init_testing_logger},
DatabaseProtocol,
};

#[tokio::test]
async fn test_join_with_coercion() {
init_testing_logger();

insta::assert_snapshot!(execute_query(
// language=PostgreSQL
r#"
WITH
t1 AS (
SELECT 1::int2 AS i1
),
t2 AS (
SELECT 1::int4 AS i2
)
SELECT
*
FROM
t1 LEFT JOIN t2 ON (t1.i1 = t2.i2)
"#
.to_string(),
DatabaseProtocol::PostgreSQL,
)
.await
.unwrap());
}

#[tokio::test]
async fn test_triple_join_with_coercion() {
init_testing_logger();

insta::assert_snapshot!(execute_query(
// language=PostgreSQL
r#"
WITH
t1 AS (
SELECT 1::int2 AS i1
),
t2 AS (
SELECT 1::int4 AS i2
),
t3 AS (
SELECT 1::int8 AS i3
)
SELECT
*
FROM
t1
LEFT JOIN t2 ON (t1.i1 = t2.i2)
LEFT JOIN t3 ON (t3.i3 = t2.i2)
"#
.to_string(),
DatabaseProtocol::PostgreSQL,
)
.await
.unwrap());
}
12 changes: 6 additions & 6 deletions rust/cubesqlplanner/Cargo.lock

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

2 changes: 1 addition & 1 deletion rust/cubesqlplanner/cubesqlplanner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "400fa0d889a8a38ca69f36d5750dfb572fc6018e", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "dcf3e4aa26fd112043ef26fa4a78db5dbd443c86", default-features = false, features = ["regex_expressions", "unicode_expressions"] }
tokio = { version = "^1.35", features = ["full", "rt", "tracing"] }
itertools = "0.10.2"
cubeclient = { path = "../../cubesql/cubeclient" }
Expand Down