Error message for 2nd query confusingly also lists 1st query if it has trailing comments
Final Release Note
Description
Sequentially executing the following two queries with comments results in this behavior. Queries:
SELECT NULL FROM names GROUP BY NULL; -- non integer constants in GroupBy are not allowed
SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello'; -- non integer constants in GroupBy are not allowed
Output seen:
OCTO> SELECT NULL FROM names GROUP BY NULL; -- non integer constants in GroupBy are not allowed
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/build/parser.y:819 2021-12-08 17:03:22 : ERR_GROUP_BY_ONLY_COLUMN_NAME : Only column names are valid in GROUP BY (not expressions or constants)
Error with syntax near (line 1, column 32):
SELECT NULL FROM names GROUP BY NULL; -- non integer constants in GroupBy are not allowed
^^^^
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/src/parse_line.c:45 2021-12-08 17:03:22 : ERR_PARSING_COMMAND : Error parsing statement: SELECT NULL FROM names GROUP BY NULL;
OCTO> SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello'; -- non integer constants in GroupBy are not allowed
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/build/parser.y:819 2021-12-08 17:03:22 : ERR_GROUP_BY_ONLY_COLUMN_NAME : Only column names are valid in GROUP BY (not expressions or constants)
Error with syntax near (line 2, column 33):
SELECT NULL FROM names GROUP BY NULL; -- non integer constants in GroupBy are not allowed
SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello'; -- non integer constants in GroupBy are not allowed
^^^^
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/src/parse_line.c:45 2021-12-08 17:03:22 : ERR_PARSING_COMMAND : Error parsing statement: -- non integer constants in GroupBy are not allowed
SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello';
Note this behavior is not seen when same queries are executed without comments
OCTO> SELECT NULL FROM names GROUP BY NULL;
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/build/parser.y:819 2021-12-08 17:04:34 : ERR_GROUP_BY_ONLY_COLUMN_NAME : Only column names are valid in GROUP BY (not expressions or constants)
Error with syntax near (line 2, column 33):
SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello'; -- non integer constants in GroupBy are not allowed
SELECT NULL FROM names GROUP BY NULL;
^^^^
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/src/parse_line.c:45 2021-12-08 17:04:34 : ERR_PARSING_COMMAND : Error parsing statement: -- non integer constants in GroupBy are not allowed
SELECT NULL FROM names GROUP BY NULL;
OCTO> SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello';
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/build/parser.y:819 2021-12-08 17:04:48 : ERR_GROUP_BY_ONLY_COLUMN_NAME : Only column names are valid in GROUP BY (not expressions or constants)
Error with syntax near (line 1, column 33):
SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello';
^^^^
[ERROR] /home/ganesh/ydbworks/gitlab/YottaDB/YDBOcto/src/parse_line.c:45 2021-12-08 17:04:48 : ERR_PARSING_COMMAND : Error parsing statement: SELECT NULL FROM names GROUP BY NULL HAVING NULL!='hello';
Draft Release Note
Edited by Jon Badiali