Skip to content

Commit de10c23

Browse files
authored
fix(cubesql): Functions without arguments alias as plain function name (#9338)
1 parent 6ea1817 commit de10c23

17 files changed

+74
-76
lines changed

packages/cubejs-backend-native/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/cubenativeutils/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/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
@@ -10,7 +10,7 @@ homepage = "https://cube.dev"
1010

1111
[dependencies]
1212
arc-swap = "1"
13-
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "dcf3e4aa26fd112043ef26fa4a78db5dbd443c86", default-features = false, features = [
13+
datafusion = { git = 'https://github.com/cube-js/arrow-datafusion.git', rev = "1a612fc26f762f3837ecf26df2e83ba38f11a8a2", default-features = false, features = [
1414
"regex_expressions",
1515
"unicode_expressions",
1616
] }

rust/cubesql/cubesql/src/compile/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ mod tests {
11041104

11051105
assert_eq!(
11061106
logical_plan,
1107-
"Projection: CAST(utctimestamp() AS current_timestamp() AS Timestamp(Nanosecond, None)) AS COL\
1107+
"Projection: CAST(utctimestamp() AS current_timestamp AS Timestamp(Nanosecond, None)) AS COL\
11081108
\n EmptyRelation",
11091109
);
11101110
}
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
source: cubesql/src/compile/mod.rs
3-
assertion_line: 11756
4-
expression: "execute_query(\"SELECT current_timestamp::date = current_date\".to_string(),\n DatabaseProtocol::PostgreSQL).await?"
3+
expression: "execute_query(\"SELECT current_timestamp::date = current_date\".to_string(),\nDatabaseProtocol::PostgreSQL).await?"
54
---
6-
+-----------------------------------------------------+
7-
| CAST(current_timestamp() AS Date32) = currentdate() |
8-
+-----------------------------------------------------+
9-
| true |
10-
+-----------------------------------------------------+
5+
+-------------------------------------------------+
6+
| CAST(current_timestamp AS Date32) = currentdate |
7+
+-------------------------------------------------+
8+
| true |
9+
+-------------------------------------------------+
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
source: cubesql/src/compile/mod.rs
3-
expression: "execute_query(\"SELECT current_schema()\".to_string(),\n DatabaseProtocol::PostgreSQL).await?"
3+
expression: "execute_query(\"SELECT current_schema()\".to_string(),\nDatabaseProtocol::PostgreSQL).await?"
44
---
5-
+------------------+
6-
| current_schema() |
7-
+------------------+
8-
| public |
9-
+------------------+
5+
+----------------+
6+
| current_schema |
7+
+----------------+
8+
| public |
9+
+----------------+
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
source: cubesql/src/compile/mod.rs
3-
expression: "execute_query(\"SELECT localtimestamp = current_timestamp\".to_string(),\n DatabaseProtocol::PostgreSQL).await?"
3+
expression: "execute_query(\"SELECT localtimestamp = current_timestamp\".to_string(),\nDatabaseProtocol::PostgreSQL).await?"
44
---
5-
+----------------------------------------+
6-
| localtimestamp() = current_timestamp() |
7-
+----------------------------------------+
8-
| true |
9-
+----------------------------------------+
5+
+------------------------------------+
6+
| localtimestamp = current_timestamp |
7+
+------------------------------------+
8+
| true |
9+
+------------------------------------+

rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__pg_catalog_udf_search_path.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source: cubesql/src/compile/mod.rs
33
expression: "execute_query(\"SELECT version() UNION ALL SELECT pg_catalog.version();\".to_string(),\nDatabaseProtocol::PostgreSQL).await?"
44
---
55
+-----------------------------------+
6-
| version() |
6+
| version |
77
+-----------------------------------+
88
| PostgreSQL 14.2 on x86_64-cubesql |
99
| PostgreSQL 14.2 on x86_64-cubesql |

rust/cubesql/cubesql/src/compile/snapshots/cubesql__compile__tests__quicksight_sql_implementation_info.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
source: cubesql/src/compile/mod.rs
3-
expression: "execute_query(r#\"\n SELECT character_value, version() \n FROM INFORMATION_SCHEMA.SQL_IMPLEMENTATION_INFO\n WHERE implementation_info_id IN ('17','18')\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?"
3+
expression: "execute_query(r#\"\n SELECT character_value, version()\n FROM INFORMATION_SCHEMA.SQL_IMPLEMENTATION_INFO\n WHERE implementation_info_id IN ('17','18')\n \"#.to_string(),\nDatabaseProtocol::PostgreSQL).await?"
44
---
55
+-----------------+-----------------------------------+
6-
| character_value | version() |
6+
| character_value | version |
77
+-----------------+-----------------------------------+
88
| PostgreSQL | PostgreSQL 14.2 on x86_64-cubesql |
99
| 14.02.0000) | PostgreSQL 14.2 on x86_64-cubesql |

0 commit comments

Comments
 (0)