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
fix: try to lower plain reserved functions to columns as well (apache#16669)
When a reserved function like `user` is called without parenthesis, it
may as well be a column. This works in PostgreSQL for example:
```text
psql (17.5 (Debian 17.5-1.pgdg120+1))
Type "help" for help.
postgres=# create table t(a int, "user" text);
CREATE TABLE
postgres=# insert into t values (1, 'foo');
INSERT 0 1
postgres=# select t.user from t;
user
------
foo
(1 row)
postgres=# select user from t;
user
----------
postgres
(1 row)
```
However sqlparser tries to detect these functions, see
apache/datafusion-sqlparser-rs#1909
We now first try to use the respective function and then also consider
columns.
Fixesapache#14141.
0 commit comments