You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, DataFusion allows their schemas to be different, which may lead to some query failures or incorrect results.
To Reproduce
Run queries on CLI
DataFusion CLI v36.0.0
❯ WITH RECURSIVE my_cte AS(
SELECT 1::int AS a
UNION ALL
SELECT a+2 FROM my_cte WHERE a<3
) SELECT * FROM my_cte;
Arrow error: Invalid argument error: Invalid comparison operation: Int64 < Int32
❯ WITH RECURSIVE my_cte AS (
SELECT 1::bigint AS a
UNION ALL
SELECT a+2, 'a','c' FROM my_cte WHERE a<3
) SELECT * FROM my_cte;
+---+---+---+
| a |||
+---+---+---+
| 1 |||| 3 | a | c |
+---+---+---+
2 rows in set. Query took 0.020 seconds.
❯ WITH RECURSIVE my_cte AS (
SELECT 1 AS a
UNION ALL
SELECT 'abc' FROM my_cte WHERE CAST(a AS text) !='abc'
) SELECT * FROM my_cte;
+-----+
| a |
+-----+
| 1 || abc |
+-----+
2 rows in set. Query took 0.012 seconds.
Expected behavior
Query 1 should be successful.
Query 2 and query 3 should fail, because the number of columns and the data types between the output rows are not the same.
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently, DataFusion allows their schemas to be different, which may lead to some query failures or incorrect results.
To Reproduce
Run queries on CLI
Expected behavior
Additional context
No response
The text was updated successfully, but these errors were encountered: