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

parse_subexpr doesn't handle alias #1439

Closed
Eason0729 opened this issue Sep 23, 2024 · 2 comments · Fixed by #1444
Closed

parse_subexpr doesn't handle alias #1439

Eason0729 opened this issue Sep 23, 2024 · 2 comments · Fixed by #1444

Comments

@Eason0729
Copy link
Contributor

It seems like parse_subexpr doesn't handle alias.

Here is some example:

1 + 3 * col0 as new_col0

It returns...

BinaryOp { left: Value(Number("1", false)), op: Plus, right: BinaryOp { left: Value(Number("3", false)), op: Multiply, right: Identifier(Ident { value: "col0", quote_style: None }) } }

I would like to work on this, but I have almost no experience writing parser, would probably need some help.

@Eason0729
Copy link
Contributor Author

Sorry for filling bad issue, I think maybe using parse_identifier_with_alias would be the correct way to do handle alias

@Eason0729
Copy link
Contributor Author

I think parse_subexpr is not responsible for handling alias, and making parse_expr_with_alias public should serve the purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant