You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jonahgao (via GitHub)" <gi...@apache.org> on 2023/08/11 05:49:48 UTC
[GitHub] [arrow-datafusion] jonahgao opened a new pull request, #7263: fix: CLI should support different sql dialects
jonahgao opened a new pull request, #7263:
URL: https://github.com/apache/arrow-datafusion/pull/7263
## Which issue does this PR close?
Partially #7255
datafusion-cli currently only supports the generic dialect.
For example:
```
DataFusion CLI v28.0.0
❯ set datafusion.sql_parser.dialect = postgresql;
0 rows in set. Query took 0.003 seconds.
❯ select 17 # 5; 🤔 Invalid statement: sql parser error: No infix parser for token Sharp
```
`select 17 # 5` is valid in the PostgreSQL dialect, but got an ‘Invalid statement’ error.
This is because the rustyline validator only supports the generic dialect, not the one specified by the current user.
https://github.com/apache/arrow-datafusion/blob/bb185a64d1ec14eb3f6c638147d382a2a0fcf4dd/datafusion-cli/src/helper.rs#L53
## Rationale for this change
- rustyline validator takes into consideration the current user’s dialect setting.
- After SQL statement execution is completed, attempt to synchronize the validator’s dialect.
## What changes are included in this PR?
CLI support different sql dialects.
## Are these changes tested?
Yes
## Are there any user-facing changes?
No
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow-datafusion] alamb merged pull request #7263: fix: CLI should support different sql dialects
Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #7263:
URL: https://github.com/apache/arrow-datafusion/pull/7263
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org