Skip to content

Wrong result for parsing special double number value #1619

Closed
@goldmedal

Description

@goldmedal

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions