Apache DataFusion SQL Query Engine
Convert escaped error checks to plain text in five sqllogictest files (#27264)
Ian Tang64c29642d1b5
diff --git a/datafusion/sqllogictest/test_files/explain.slt b/datafusion/sqllogictest/test_files/explain.sltindex 9b0984c129..2ad699a04e 100644--- a/datafusion/sqllogictest/test_files/explain.slt+++ b/datafusion/sqllogictest/test_files/explain.slt@@ -606,8 +606,11 @@ physical_plan07)└───────────────────────────┘# number is not a valid format-query error DataFusion error: SQL error: ParserError\("Expected: an explain format such as TREE, found: 123 at Line: 1, Column: 16"\)+query errorexplain format 123 select * from values (1);+----+DataFusion error: SQL error: ParserError("Expected: an explain format such as TREE, found: 123 at Line: 1, Column: 16")+# verbose tree mode not supportedquery error DataFusion error: Error during planning: EXPLAIN VERBOSE with FORMAT is not supported@@ -726,11 +729,17 @@ statement okset datafusion.explain.format = "indent";# no such thing as json mode-query error DataFusion error: Invalid or Unsupported Configuration: Invalid explain format\. Expected 'indent', 'tree', 'pgjson' or 'graphviz'\. Got 'json'+query errorexplain format json select * from values (1);+----+DataFusion error: Invalid or Unsupported Configuration: Invalid explain format. Expected 'indent', 'tree', 'pgjson' or 'graphviz'. Got 'json'+-query error DataFusion error: Invalid or Unsupported Configuration: Invalid explain format\. Expected 'indent', 'tree', 'pgjson' or 'graphviz'\. Got 'foo'+query errorexplain format foo select * from values (1);+----+DataFusion error: Invalid or Unsupported Configuration: Invalid explain format. Expected 'indent', 'tree', 'pgjson' or 'graphviz'. Got 'foo'+# pgjson modequery TT@@ -905,8 +914,11 @@ statement error DataFusion error: Error during planning: expected boolean for EXEXPLAIN (COSTS maybe) SELECT 1;# Unrecognized argument for a string/ident option.-statement error DataFusion error: Invalid or Unsupported Configuration: Invalid explain format\. Expected 'indent', 'tree', 'pgjson' or 'graphviz'\. Got 'bogus'+statement errorEXPLAIN (FORMAT bogus) SELECT 1;+----+DataFusion error: Invalid or Unsupported Configuration: Invalid explain format. Expected 'indent', 'tree', 'pgjson' or 'graphviz'. Got 'bogus'+# Legacy keyword form still works on PostgreSQL dialect.query TTdiff --git a/datafusion/sqllogictest/test_files/joins.slt b/datafusion/sqllogictest/test_files/joins.sltindex db9d138849..23fef32e66 100644--- a/datafusion/sqllogictest/test_files/joins.slt+++ b/datafusion/sqllogictest/test_files/joins.slt@@ -2703,8 +2703,11 @@ SELECT t1.c1, t2.c2 FROM test_partition_table t1 JOIN test_partition_table t2 US0 10# left_join_using_qualified (snowflake syntax)-query error DataFusion error: This feature is not implemented: Invalid identifier in USING clause\. Expected single identifier, got t2\.c2+query errorSELECT t1.c1, t2.c2 FROM test_partition_table t1 JOIN test_partition_table t2 USING (t2.c2) ORDER BY t2.c2;+----+DataFusion error: This feature is not implemented: Invalid identifier in USING clause. Expected single identifier, got t2.c2+# left_join_using_join_key_projectionquery III@@ -4183,8 +4186,11 @@ physical_plan_error This feature is not implemented: Physical plan does not supp# Test CROSS JOIN LATERAL syntax (execution)# TODO: https://github.com/apache/datafusion/issues/10048-query error DataFusion error: This feature is not implemented: Physical plan does not support logical expression OuterReferenceColumn\(Field \{ name: "t1_int", data_type: UInt32, nullable: true \}, Column \{ relation: Some\(Bare \{ table: "t1" \}\), name: "t1_int" \}\)+query errorselect t1_id, t1_name, i from join_t1 t1 cross join lateral (select * from unnest(generate_series(1, t1_int))) as series(i);+----+DataFusion error: This feature is not implemented: Physical plan does not support logical expression OuterReferenceColumn(Field { name: "t1_int", data_type: UInt32, nullable: true }, Column { relation: Some(Bare { table: "t1" }), name: "t1_int" })+# Test INNER JOIN LATERAL syntax (planning)@@ -4207,12 +4213,18 @@ physical_plan_error This feature is not implemented: Physical plan does not supp# Test INNER JOIN LATERAL syntax (execution)# TODO: https://github.com/apache/datafusion/issues/10048-query error DataFusion error: This feature is not implemented: Physical plan does not support logical expression OuterReferenceColumn\(Field \{ name: "t1_int", data_type: UInt32, nullable: true \}, Column \{ relation: Some\(Bare \{ table: "t2" \}\), name: "t1_int" \}\)+query errorselect t1_id, t1_name, i from join_t1 t2 inner join lateral (select * from unnest(generate_series(1, t1_int))) as series(i) on(t1_id > i);+----+DataFusion error: This feature is not implemented: Physical plan does not support logical expression OuterReferenceColumn(Field { name: "t1_int", data_type: UInt32, nullable: true }, Column { relation: Some(Bare { table: "t2" }), name: "t1_int" })+# Test RIGHT JOIN LATERAL syntax (unsupported)-query error DataFusion error: This feature is not implemented: LATERAL syntax is not supported for FULL OUTER and RIGHT \[OUTER \| ANTI \| SEMI\] joins+query errorselect t1_id, t1_name, i from join_t1 t1 right join lateral (select * from unnest(generate_series(1, t1_int))) as series(i);+----+DataFusion error: This feature is not implemented: LATERAL syntax is not supported for FULL OUTER and RIGHT [OUTER | ANTI | SEMI] joins+# Functional dependencies across a joindiff --git a/datafusion/sqllogictest/test_files/order.slt b/datafusion/sqllogictest/test_files/order.sltindex d00b437053..bb93634f5b 100644--- a/datafusion/sqllogictest/test_files/order.slt+++ b/datafusion/sqllogictest/test_files/order.slt@@ -633,12 +633,18 @@ reset datafusion.sql_parser.dialect;# distinct on a column not in the select list should not work-statement error DataFusion error: Error during planning: For SELECT DISTINCT, ORDER BY expressions t\.time must appear in select list+statement errorSELECT DISTINCT value FROM t ORDER BY time;+----+DataFusion error: Error during planning: For SELECT DISTINCT, ORDER BY expressions t.time must appear in select list+# distinct on an expression of a column not in the select list should not work-statement error DataFusion error: Error during planning: For SELECT DISTINCT, ORDER BY expressions t\.time must appear in select list+statement errorSELECT DISTINCT date_trunc('hour', time) FROM t ORDER BY time;+----+DataFusion error: Error during planning: For SELECT DISTINCT, ORDER BY expressions t.time must appear in select list+# distinct on a column that is in the select list but aliasted should workquery P@@ -1091,8 +1097,11 @@ CREATE EXTERNAL TABLE dt (a_id integer, a_str string, a_bool boolean) STORED AS# Create external table with order column expression that can't be planned# This is currently expected to fail, but should not panic-query error DataFusion error: Schema error: No field named a\.+query errorCREATE EXTERNAL TABLE dt STORED AS CSV WITH ORDER (a || b) LOCATION 'file://path/to/table';+----+DataFusion error: Schema error: No field named a.+# Sort with duplicate sort expressionsdiff --git a/datafusion/sqllogictest/test_files/scalar.slt b/datafusion/sqllogictest/test_files/scalar.sltindex b62113febe..1585ba2a29 100644--- a/datafusion/sqllogictest/test_files/scalar.slt+++ b/datafusion/sqllogictest/test_files/scalar.slt@@ -2001,8 +2001,11 @@ NULL NULLquery error Error during planning: Unary operator '-' only supports signed numeric, interval and timestamp typesSELECT -'100'-query error DataFusion error: Error during planning: Unary operator '\+' only supports numeric, interval and timestamp types+query errorSELECT +true+----+DataFusion error: Error during planning: Unary operator '+' only supports numeric, interval and timestamp types+statement okdrop table test_booleandiff --git a/datafusion/sqllogictest/test_files/select.slt b/datafusion/sqllogictest/test_files/select.sltindex 86c9ca8e8e..a64fe024bb 100644--- a/datafusion/sqllogictest/test_files/select.slt+++ b/datafusion/sqllogictest/test_files/select.slt@@ -322,14 +322,23 @@ three 1NULL 1# select_values_list-statement error DataFusion error: SQL error: ParserError\("Expected: \(, found: EOF"\)+statement errorVALUES+----+DataFusion error: SQL error: ParserError("Expected: (, found: EOF")+-statement error DataFusion error: SQL error: ParserError\("Expected: an expression, found: \) at Line: 1, Column: 9"\)+statement errorVALUES ()+----+DataFusion error: SQL error: ParserError("Expected: an expression, found: ) at Line: 1, Column: 9")+-statement error DataFusion error: SQL error: ParserError\("Expected: an expression, found: \) at Line: 1, Column: 13"\)+statement errorVALUES (1),()+----+DataFusion error: SQL error: ParserError("Expected: an expression, found: ) at Line: 1, Column: 13")+statement error DataFusion error: Error during planning: Inconsistent data length across values list: got 2 values in row 1 but expected 1VALUES (1),(1,2)@@ -505,8 +514,11 @@ select '1' from foo order by column1;1# foo distinct order by-statement error DataFusion error: Error during planning: For SELECT DISTINCT, ORDER BY expressions foo\.column1 must appear in select list+statement errorselect distinct '1' from foo order by column1;+----+DataFusion error: Error during planning: For SELECT DISTINCT, ORDER BY expressions foo.column1 must appear in select list+# distincts for float nanquery BBBBBBBBBBBBBBBBB@@ -838,8 +850,11 @@ SELECT ALL * FROM aggregate_simple;# select distinct all (-query error DataFusion error: SQL error: ParserError\("Cannot specify DISTINCT then ALL at Line: 1, Column: 8"\)+query errorSELECT DISTINCT ALL * FROM aggregate_simple+----+DataFusion error: SQL error: ParserError("Cannot specify DISTINCT then ALL at Line: 1, Column: 8")+# select distinct with projection and order byquery R@@ -1173,8 +1188,13 @@ SELECT * FROM empty_tablestatement okCREATE TABLE case_sensitive_table("INT32" int) AS VALUES (1), (2), (3), (4), (5);-statement error DataFusion error: Schema error: No field named int32\. Did you mean 'case_sensitive_table\."INT32"'\?\nColumn names are case sensitive\. You can use double quotes to refer to the case_sensitive_table\."INT32" column or disable the datafusion\.sql_parser\.enable_ident_normalization configuration\.\nValid fields are case_sensitive_table\."INT32"\.+statement errorselect "int32" from case_sensitive_table+----+DataFusion error: Schema error: No field named int32. Did you mean 'case_sensitive_table."INT32"'?+Column names are case sensitive. You can use double quotes to refer to the case_sensitive_table."INT32" column or disable the datafusion.sql_parser.enable_ident_normalization configuration.+Valid fields are case_sensitive_table."INT32".+query Iselect "INT32" from case_sensitive_table;@@ -1311,27 +1331,39 @@ SELECT * EXCLUDE(a, a)FROM table1# if EXCEPT all the columns, query should return an error-statement error DataFusion error: Error during planning: SELECT list is empty after resolving \* expressions, the wildcard expanded to zero columns+statement errorSELECT * EXCEPT(a, b, c, d)FROM table1+----+DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns+# try zero column with LIMIT, should error-statement error DataFusion error: Error during planning: SELECT list is empty after resolving \* expressions, the wildcard expanded to zero columns+statement errorSELECT * EXCEPT (a, b, c, d)FROM table1LIMIT 1+----+DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns+# try zero column with GROUP BY, should error-statement error DataFusion error: Error during planning: SELECT list is empty after resolving \* expressions, the wildcard expanded to zero columns+statement errorSELECT * EXCEPT (a, b, c, d)FROM table1GROUP BY a+----+DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns+# try zero column with WHERE, should error-statement error DataFusion error: Error during planning: SELECT list is empty after resolving \* expressions, the wildcard expanded to zero columns+statement errorSELECT * EXCEPT (a, b, c, d)FROM table1WHERE a = 1+----+DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns+# create table2 the same with table1statement ok@@ -1345,14 +1377,17 @@ CREATE TABLE table2 ((2, 20, 200, 2000);# try zero column with inner JOIN, should error-statement error DataFusion error: Error during planning: SELECT list is empty after resolving \* expressions, the wildcard expanded to zero columns+statement errorWITH t1 AS (SELECT a AS t1_a FROM table1), t2 AS (SELECT a AS t2_a FROM table2)SELECT * EXCEPT (t1_a, t2_a)FROM t1JOIN t2 ON (t1_a = t2_a)+----+DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns+# try zero column with more JOIN, should error-statement error DataFusion error: Error during planning: SELECT list is empty after resolving \* expressions, the wildcard expanded to zero columns+statement errorSELECT * EXCEPT (b1, b2)FROM (SELECT b AS b1 FROM table1@@ -1360,9 +1395,12 @@ FROM (JOIN (SELECT b AS b2 FROM table2) ON b1 = b2+----+DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns+# try zero column with Window, should error-statement error DataFusion error: Error during planning: SELECT list is empty after resolving \* expressions, the wildcard expanded to zero columns+statement errorSELECT * EXCEPT (a, b, row_num)FROM (SELECT@@ -1371,6 +1409,9 @@ FROM (ROW_NUMBER() OVER (ORDER BY b) AS row_numFROM table1)+----+DataFusion error: Error during planning: SELECT list is empty after resolving * expressions, the wildcard expanded to zero columns+# EXCLUDE order shouldn't matterquery II@@ -1814,8 +1855,12 @@ select a + b from (select 1 as a, 2 as b, 1 as "a + b");3# Can't reference an output column by expression over projection.-query error DataFusion error: Schema error: No field named a\.\nValid fields are "a \+ Int64\(1\)"\.+query errorselect a + 1 from (select a+1 from (select 1 as a));+----+DataFusion error: Schema error: No field named a.+Valid fields are "a + Int64(1)".+query Iselect "a + Int64(1)" + 10 from (select a+1 from (select 1 as a));@@ -1852,12 +1897,19 @@ statement okDROP TABLE test;# Can't reference an unqualified column by a qualified name-query error DataFusion error: Schema error: No field named t1\.v1\. Did you mean '"t1\.v1"'\?\nValid fields are "t1\.v1"\.+query errorSELECT t1.v1 FROM (SELECT 1 AS "t1.v1");+----+DataFusion error: Schema error: No field named t1.v1. Did you mean '"t1.v1"'?+Valid fields are "t1.v1".+# Test issue: https://github.com/apache/datafusion/issues/14124-query error DataFusion error: Arrow error: Arithmetic overflow: Overflow happened on: 10000 \* 100000000000000000000000000000000000+query errorSELECT ('0.54321543215432154321543215432154321'::DECIMAL(35,35) + 10000)::VARCHAR+----+DataFusion error: Arrow error: Arithmetic overflow: Overflow happened on: 10000 * 100000000000000000000000000000000000+# where_selection_with_ambiguous_columnstatement ok