Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sqlitelogictest - Omitting AS in a result set column alias name #6495

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

Sqlitelogictest - Omitting AS in a result set column alias name #6495

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels
bug Something isn't working minor SQL

Comments

@monetdb-team
Copy link

Date: 2017-12-13 16:09:40 +0100
From: @PedroTadim
To: SQL devs <>
Version: -- development
CC: @njnes

Last updated: 2018-02-12 16:12:04 +0100

Comment 26001

Date: 2017-12-13 16:09:40 +0100
From: @PedroTadim

User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
Build Identifier:

It is not possible to omit the AS keyword in a result set column alias definition: SELECT - col4 [AS] col0 FROM tab0 WHERE NOT NULL IS NULL;

Reproducible: Always

Steps to Reproduce:

  1. CREATE TABLE tab0(pk INTEGER PRIMARY KEY, col0 INTEGER, col1 FLOAT, col2 TEXT, col3 INTEGER, col4 FLOAT, col5 TEXT);
  2. SELECT - col4 col0 FROM tab0 WHERE NOT NULL IS NULL;

Actual Results:

Query compilation error:
syntax error, unexpected IDENT, expecting SCOLON in: "select - col4 col0"

Expected Results:

An empty result set.

Yesterday I fixed this by adding the extra grammar rule in the parser, but it created 2 new shift/reduce conflicts which caused the hexadecimal_literals.Bug-3621 test to fail :(

Comment 26005

Date: 2017-12-13 16:30:14 +0100
From: MonetDB Mercurial Repository <>

Changeset 6f3ac2786528 made by Pedro Ferreira pedro.ferreira@monetdbsolutions.com in the MonetDB repo, refers to this bug.

For complete details, see https//devmonetdborg/hg/MonetDB?cmd=changeset;node=6f3ac2786528

Changeset description:

Added tests for bugs 6494, 6495 and 6496

Comment 26018

Date: 2017-12-16 13:23:18 +0100
From: @njnes

the fix is correct. As now incorrect hex values gets accepted as column names (ie
0xg is value 0 with alias xg)

@monetdb-team monetdb-team added bug Something isn't working minor SQL labels Nov 30, 2020
@sjoerdmullender sjoerdmullender added this to the Ancient Release milestone Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor SQL
Projects
None yet
Development

No branches or pull requests

2 participants