Minus a reserved word?


I have a column named minus. I’m guessing it is a reserved word, because whenever I reference it, my queries break. For example:
select sum(minus) from....
results in:

Exception: Parse failed: Encountered “( minus” at line 1, column 11. Was expecting one of: “NOT” …

Is there a way to escape or do I have to alter my column name?



minus is a reserved word, please try your query as

select sum("minus") from ....


mapdql> create table badone (minus int);
mapdql> insert into badone values (23);
mapdql> insert into badone values (47);
mapdql> select max("minus") from badone;



It would be preferable to sync the reserved words between the legacy and calcite parsers



We have also synced the reserved word list with latest calcite set.

This will stop the CREATE TABLE from being able to build a table with a column that is a reserved word.