xudong963 edited a comment on issue #1414:
URL:
https://github.com/apache/arrow-datafusion/issues/1414#issuecomment-988087938
FYI
**postgres**
```sql
postgres=# create table foo (
a int,
b int
);
CREATE TABLE
postgres=# insert into foo (a, b) values (1, 2);
insert into foo (a, b) values (null, 3);
INSERT 0 1
INSERT 0 1
postgres=# select a from foo order by 1;
a
---
1
(2 rows)
postgres=# select a, b from foo order by 1;
a | b
---+---
1 | 2
| 3
(2 rows)
postgres=# select a, b from foo order by 1 desc;
a | b
---+---
| 3
1 | 2
(2 rows)
postgres=# select a, b from foo order by 2 desc;
a | b
---+---
| 3
1 | 2
(2 rows)
postgres=# select a from foo order by 2;
ERROR: ORDER BY position 2 is not in select list
LINE 1: select a from foo order by 2;
^
postgres=#
```
**Datafusion**
```sql
❯ select column1 from foo order by 1;
ArrowError(ExternalError(Plan("Sort operation is not applicable to scalar
value 1")))
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]