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
{{ message }}
Repository navigation
Commit cc06c62
Browse filesBrowse the repository at this point in the historyBrowse files
## Which issue does this PR close?
<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closesapache#123` indicates that this PR will close issue apache#123.
-->
- Closesapache#21253.
## Rationale for this change
<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
- Get extended CI tests running again.
## What changes are included in this PR?
<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->
- This reverts commit aadae6b.
## Are these changes tested?
<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code
If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->
Existing CI.
## Are there any user-facing changes?
<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->
No change since a released version. apache#21126 fixed a bug that this will
reintroduce, but we'll need to fix test files first.
<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
let err = logical_plan(sql).expect_err("query should have failed");
793
+
793
794
assert_snapshot!(
794
-
plan,
795
-
@r"
796
-
Projection: person.age, person.age AS age:1
797
-
TableScan: person
798
-
"
795
+
err.strip_backtrace(),
796
+
@r#"Error during planning: Projections require unique expression names but the expression "person.age" at position 0 and "person.age" at position 1 have the same name. Consider aliasing ("AS") one of them."#
let sql = "SELECT MIN(age), MIN(age) FROM person";
1536
-
let plan = logical_plan(sql).unwrap();
1534
+
let err = logical_plan(sql).expect_err("query should have failed");
1535
+
1537
1536
assert_snapshot!(
1538
-
plan,
1539
-
@r"
1540
-
Projection: min(person.age), min(person.age) AS min(person.age):1
1541
-
Aggregate: groupBy=[[]], aggr=[[min(person.age)]]
1542
-
TableScan: person
1543
-
"
1537
+
err.strip_backtrace(),
1538
+
@r#"Error during planning: Projections require unique expression names but the expression "min(person.age)" at position 0 and "min(person.age)" at position 1 have the same name. Consider aliasing ("AS") one of them."#
let sql = "SELECT MIN(age) AS a, MIN(age) AS a FROM person";
1592
-
let plan = logical_plan(sql).unwrap();
1587
+
let err = logical_plan(sql).expect_err("query should have failed");
1588
+
1593
1589
assert_snapshot!(
1594
-
plan,
1595
-
@r"
1596
-
Projection: min(person.age) AS a, min(person.age) AS a AS a:1
1597
-
Aggregate: groupBy=[[]], aggr=[[min(person.age)]]
1598
-
TableScan: person
1599
-
"
1590
+
err.strip_backtrace(),
1591
+
@r#"Error during planning: Projections require unique expression names but the expression "min(person.age) AS a" at position 0 and "min(person.age) AS a" at position 1 have the same name. Consider aliasing ("AS") one of them."#
@r#"Error during planning: Projections require unique expression names but the expression "person.state AS a" at position 0 and "min(person.age) AS a" at position 1 have the same name. Consider aliasing ("AS") one of them."#
@r#"Error during planning: Projections require unique expression names but the expression "min(person.age)" at position 1 and "min(person.age)" at position 2 have the same name. Consider aliasing ("AS") one of them."#
# Duplicate aggregate expressions are now auto-suffixed
7945
-
query II
7944
+
# DataFusion error: Error during planning: Projections require unique expression names but the expression "count\(Int64\(1\)\)" at position 0 and "count\(Int64\(1\)\)" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
7945
+
query error
7946
7946
select count(1), count(1) from t;
7947
-
----
7948
-
2 2
7949
7947
7950
-
query II
7948
+
# DataFusion error: Error during planning: Projections require unique expression names but the expression "count\(Int64\(1\)\)" at position 0 and "count\(Int64\(1\)\)" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
7949
+
query error
7950
+
explain select count(1), count(1) from t;
7951
+
7952
+
# DataFusion error: Error during planning: Projections require unique expression names but the expression "count\(Int64\(1\) AS \)" at position 0 and "count\(Int64\(1\) AS \)" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
7953
+
query error
7951
7954
select count(), count() from t;
7952
-
----
7953
-
2 2
7955
+
7956
+
# DataFusion error: Error during planning: Projections require unique expression names but the expression "count\(Int64\(1\) AS \)" at position 0 and "count\(Int64\(1\) AS \)" at position 1 have the same name\. Consider aliasing \("AS"\) one of them\.
Copy file name to clipboardExpand all lines: datafusion/sqllogictest/test_files/unnest.slt
+1-9Lines changed: 1 addition & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -547,16 +547,8 @@ select unnest(column1) from (select * from (values([1,2,3]), ([4,5,6])) limit 1
547
547
5
548
548
6
549
549
550
-
query II
550
+
query error DataFusion error: Error during planning: Projections require unique expression names but the expression "UNNEST\(unnest_table.column1\)" at position 0 and "UNNEST\(unnest_table.column1\)" at position 1 have the same name. Consider aliasing \("AS"\) one of them.
551
551
select unnest(column1), unnest(column1) from unnest_table;
552
-
----
553
-
1 1
554
-
2 2
555
-
3 3
556
-
4 4
557
-
5 5
558
-
6 6
559
-
12 12
560
552
561
553
query II
562
554
select unnest(column1), unnest(column1) u1 from unnest_table;
0 commit comments