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 = "016c22f74b82f241fc01abd205020cb52b6c911e", default-features = false, features = [
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "4f8f7de0617b0580beb5d4140b5f9ce58ef18efc", default-features = false, features = [
"regex_expressions",
"unicode_expressions",
] }
Expand Down
26 changes: 0 additions & 26 deletions rust/cubesql/cubesql/src/compile/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,6 @@ pub fn parse_sql_to_statements(
let query = query.replace("UNSIGNED INTEGER", "bigint");

// DBeaver
let query = query.replace(
"SELECT db.oid,db.* FROM pg_catalog.pg_database db",
"SELECT db.oid as _oid,db.* FROM pg_catalog.pg_database db",
);
let query = query.replace(
"SELECT t.oid,t.*,c.relkind",
"SELECT t.oid as _oid,t.*,c.relkind",
);
let query = query.replace(
"SELECT n.oid,n.*,d.description FROM",
"SELECT n.oid as _oid,n.*,d.description FROM",
);
let query = query.replace("SELECT c.oid,c.*,", "SELECT c.oid as _oid,c.*,");
let query = query.replace("SELECT a.oid,a.*,", "SELECT a.oid as _oid,a.*,");
let query = query.replace(
"LEFT OUTER JOIN pg_depend dep on dep.refobjid = a.attrelid AND dep.deptype = 'i' and dep.refobjsubid = a.attnum and dep.classid = dep.refclassid",
"LEFT OUTER JOIN pg_depend dep on dep.refobjid = a.attrelid AND dep.deptype = 'i' and dep.refobjsubid = a.attnum",
Expand Down Expand Up @@ -187,12 +173,6 @@ pub fn parse_sql_to_statements(
"WHERE quote_ident(table_schema) IN (current_user, current_schema())",
);

// psqlODBC
let query = query.replace(
"select NULL, NULL, NULL",
"select NULL, NULL AS NULL2, NULL AS NULL3",
);

// Work around an issue with lowercase table name when queried as uppercase,
// an uncommon way of casting literals, and skip a few funcs along the way
let query = query.replace(
Expand All @@ -212,12 +192,6 @@ pub fn parse_sql_to_statements(
"c.relname AS partition_name,",
);

// Work around an issue with NULL, NULL, NULL in SELECT
let query = query.replace(
"p.proname AS PROCEDURE_NAME, NULL, NULL, NULL, ",
"p.proname AS PROCEDURE_NAME, NULL AS NULL, NULL AS NULL2, NULL AS NULL3, ",
);

// Quicksight workarounds
// subquery must have an alias
let query = query.replace(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
source: cubesql/src/compile/mod.rs
expression: "execute_query(\"select NULL, NULL, NULL\".to_string(),\n DatabaseProtocol::PostgreSQL).await?"
expression: "execute_query(\"select NULL, NULL, NULL\".to_string(),\nDatabaseProtocol::PostgreSQL,).await?"
---
+------+-------+-------+
| NULL | NULL2 | NULL3 |
+------+-------+-------+
| NULL | NULL | NULL |
+------+-------+-------+
+------+---------+---------+
| NULL | NULL__1 | NULL__2 |
+------+---------+---------+
| NULL | NULL | NULL |
+------+---------+---------+
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
source: cubesql/src/compile/test/test_introspection.rs
expression: "execute_query(\"SELECT db.oid,db.* FROM pg_catalog.pg_database db WHERE datname = 'cubedb'\".to_string(),\nDatabaseProtocol::PostgreSQL).await?"
---
+-------+-------+---------+--------+----------+------------+------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------+
| _oid | oid | datname | datdba | encoding | datcollate | datctype | datistemplate | datallowconn | datconnlimit | datlastsysoid | datfrozenxid | datminmxid | dattablespace | datacl |
+-------+-------+---------+--------+----------+------------+------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------+
| 13757 | 13757 | cubedb | 10 | 6 | en_US.utf8 | en_US.utf8 | false | true | -1 | 13756 | 727 | 1 | 1663 | NULL |
+-------+-------+---------+--------+----------+------------+------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------+
+-------+--------+---------+--------+----------+------------+------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------+
| oid | oid__1 | datname | datdba | encoding | datcollate | datctype | datistemplate | datallowconn | datconnlimit | datlastsysoid | datfrozenxid | datminmxid | dattablespace | datacl |
+-------+--------+---------+--------+----------+------------+------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------+
| 13757 | 13757 | cubedb | 10 | 6 | en_US.utf8 | en_US.utf8 | false | true | -1 | 13756 | 727 | 1 | 1663 | NULL |
+-------+--------+---------+--------+----------+------------+------------+---------------+--------------+--------------+---------------+--------------+------------+---------------+--------+
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
source: cubesql/src/compile/test/test_introspection.rs
expression: "execute_query(\"SELECT n.oid,n.*,d.description FROM pg_catalog.pg_namespace n\n LEFT OUTER JOIN pg_catalog.pg_description d ON d.objoid=n.oid AND d.objsubid=0 AND d.classoid='pg_namespace'::regclass\n ORDER BY nspname\".to_string(),\nDatabaseProtocol::PostgreSQL).await?"
---
+-------+-------+--------------------+----------+--------+------+-------------+
| _oid | oid | nspname | nspowner | nspacl | xmin | description |
+-------+-------+--------------------+----------+--------+------+-------------+
| 13000 | 13000 | information_schema | 10 | NULL | 1 | NULL |
| 11 | 11 | pg_catalog | 10 | NULL | 1 | NULL |
| 2200 | 2200 | public | 10 | NULL | 1 | NULL |
+-------+-------+--------------------+----------+--------+------+-------------+
+-------+--------+--------------------+----------+--------+------+-------------+
| oid | oid__1 | nspname | nspowner | nspacl | xmin | description |
+-------+--------+--------------------+----------+--------+------+-------------+
| 13000 | 13000 | information_schema | 10 | NULL | 1 | NULL |
| 11 | 11 | pg_catalog | 10 | NULL | 1 | NULL |
| 2200 | 2200 | public | 10 | NULL | 1 | NULL |
+-------+--------+--------------------+----------+--------+------+-------------+
Loading
Loading