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
create table tt2 (x int, y int);
explain select y from tt2 order by x;
Physical Plan
---------------------------------------
PROJECT (5)
- table index: #5
- expressions: [y (#0)]
-> PROJECT (4)
- table index: #4
- expressions: [y (#0)]
-> SORT (3)
- expressions: [tt2.1 (#0) ASC]
- output columns: [y, __rowid]
-> TABLE SCAN (2)
- table name: tt2(default.tt2)
- table index: #1
- output_columns: [y, __rowid]
(13 rows)
Wrong column used in SORT.
Expected behavior
SORT by column x and output column y.
Steps to reproduce
create table tt2 (x int, y int);
insert into tt2 values (1,2), (2,1);
select * from tt2;
x | y
---+---
1 | 2
2 | 1
(2 rows)
select * from tt2 order by x;
x | y
---+---
1 | 2
2 | 1
(2 rows)
select y from tt2 order by x;
y
---
1
2
(2 rows)
Wrong result.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Is there an existing issue for the same bug?
Branch name
main
Commit ID
0ecbe1b
Other environment information
No response
Actual behavior
Expected behavior
SORT by column x and output column y.
Steps to reproduce
create table tt2 (x int, y int); insert into tt2 values (1,2), (2,1); select * from tt2; x | y ---+--- 1 | 2 2 | 1 (2 rows) select * from tt2 order by x; x | y ---+--- 1 | 2 2 | 1 (2 rows) select y from tt2 order by x; y --- 1 2 (2 rows) Wrong result.
Additional information
No response
The text was updated successfully, but these errors were encountered: