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

Closed
Tracked by #1597
goldmedal opened this issue Dec 26, 2024 · 4 comments · Fixed by #1621
Closed
Tracked by #1597

Wrong result for parsing special double number value #1619

goldmedal opened this issue Dec 26, 2024 · 4 comments · 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

@alamb
Copy link
Contributor

alamb commented Dec 28, 2024

Thanks @goldmedal and @iffyio

Do we need to make a patch release for sqlparser 53.0.0?

By my reading this is an issue that was introduced after that release but before any other release (and thus does not affect the released 53.0.0)

@goldmedal
Copy link
Contributor Author

Do we need to make a patch release for sqlparser 53.0.0?

I think we don't need to do it.

By my reading this is an issue that was introduced after that release but before any other release (and thus does not affect the released 53.0.0)

Exactly.

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.

2 participants