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

Wrong result for parsing special double number value #1619

Open
goldmedal opened this issue Dec 26, 2024 · 2 comments · May be fixed by #1621
Open

Wrong result for parsing special double number value #1619

goldmedal opened this issue Dec 26, 2024 · 2 comments · May be fixed by #1621
Assignees

Comments

@goldmedal
Copy link
Contributor

goldmedal commented Dec 26, 2024

Description

I tried to use the nightly commit in the upstream DataFusion (nightly commit) and the tests failed.

I think it's a bug caused by #1551. Consider the following SQL:

select 0. as c1

It should be parsed to

ExprWithAlias { 
  expr: Value(Number("0.", false)), 
  alias: Ident { value: "c1", quote_style: None }
}

but it seems to be parsed to

CompositeAccess { 
  expr: Value(Number("0", false)), 
  key: Ident { value: "as", quote_style: None, span: Span(Location(0,0)..Location(0,0))
}

We should handle this case in parse_compound_field_access, too.

@goldmedal
Copy link
Contributor Author

I'll take a look at this issue soon.

@goldmedal
Copy link
Contributor Author

After some tests, I believe this syntax is broken by #1600 and #1598

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