Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.3k
Change SQL dialect to PostgreSQL#214
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -21,7 +21,7 @@ | ||
| use sqlparser::{ | ||
| ast::{ColumnDef, ColumnOptionDef, Statement as SQLStatement, TableConstraint}, | ||
| dialect::{keywords::Keyword, Dialect, GenericDialect}, | ||
| dialect::{keywords::Keyword, Dialect, PostgreSqlDialect}, | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Another approach might be to make the SQL dialect be configurable on I think @andygrove has said in the past using DataFusion to mimic engines such as MySQL is a good usecase too
| ||
| parser::{Parser, ParserError}, | ||
| tokenizer::{Token, Tokenizer}, | ||
| }; | ||
| @@ -78,7 +78,7 @@ pub struct DFParser<'a> { | ||
| impl<'a> DFParser<'a> { | ||
| /// Parse the specified tokens | ||
| pub fn new(sql: &str) -> Result<Self, ParserError> { | ||
| let dialect = &GenericDialect {}; | ||
| let dialect = &PostgreSqlDialect {}; | ||
| DFParser::new_with_dialect(sql, dialect) | ||
| } | ||
| @@ -97,7 +97,7 @@ impl<'a> DFParser<'a> { | ||
| /// Parse a SQL statement and produce a set of statements with dialect | ||
| pub fn parse_sql(sql: &str) -> Result<Vec<Statement>, ParserError> { | ||
| let dialect = &GenericDialect {}; | ||
| let dialect = &PostgreSqlDialect {}; | ||
| DFParser::parse_sql_with_dialect(sql, dialect) | ||
| } | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these were added in apache/arrow#8135 . Perhaps @wqc200 has some comment about how / if this feature is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should remove support for scalar variables in the logical plan. This seems unrelated to changing the default SQL dialect. Users can use ScalarVariable without using SQL.