jdye64 opened a new issue, #5793:
URL: https://github.com/apache/arrow-datafusion/issues/5793
### Describe the bug
Invoking `OwnedTableReference::from("schema.1table")` produces an invalid
`TableReference` if the "table name" starts with a number. In this example the
result would be
```
Bare { table: "schema.1table" }
```
when in fact the correct result should be
```
Partial { schema: "schema", table: "1table" }
```
### To Reproduce
A simple test can be added to `datafusion/common/src/utils.rs` to reproduce
the bug.
```
#[test]
fn test_split_names() -> Result<()> {
let result = parse_identifiers_normalized("schema.1table");
assert_eq!(result.len(), 2);
Ok(())
}
```
### Expected behavior
Invoking `OwnedTableReference::from("schema.1table")` should produce the
result
```
Partial { schema: "schema", table: "1table" }
```
### Additional context
I have traced the issue to `sqlparser-rs` returning a `Token::Word` rather
than expected `Token::Period` at
https://github.com/apache/arrow-datafusion/blob/main/datafusion/common/src/utils.rs#L200
My main question is should be be handled in DataFusion or sqlparser-rs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]