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

SELECT foo AS bar ... support, #82

Closed
panarch opened this issue Sep 21, 2020 · 1 comment · Fixed by #98
Closed

SELECT foo AS bar ... support, #82

panarch opened this issue Sep 21, 2020 · 1 comment · Fixed by #98
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@panarch
Copy link
Member

panarch commented Sep 21, 2020

mentioned in #80

SELECT id AS SOMEALIASCOLUMNNAME, num FROM Test

Current blend.rs is not handling AS.
Simple fix, blend does not need to work on AS at all, just ignore AS and simply evaluate column expression.

@panarch panarch added enhancement New feature or request good first issue Good for newcomers labels Sep 21, 2020
@willy610
Copy link

Seems to having a solution in blend.rs as said above.
On both indents and expressions

SELECT ingredientid,ingredientid+2000 as PLUS2000 FROM ingredient 
WHERE energy > 500 
ORDER BY 1;

ingredientid    PLUS2000
15      2015
46      2046
128     2128
181     2181
253     2253
SELECT ingredientid AS NEWCOLNAME 
FROM   ingredient 
WHERE  ingredientname = 'mjölk';

NEWCOLNAME
169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
2 participants