-
Notifications
You must be signed in to change notification settings - Fork 752
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
support parse select expr as alias_name
#4841
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -127,9 +127,12 @@ impl UDFTransformer { | |
op: op.clone(), | ||
expr: Box::new(Self::clone_expr_with_replacement(&**expr, replacement_fn)?), | ||
}), | ||
Expr::Cast { expr, data_type } => Ok(Expr::Cast { | ||
Expr::Cast { | ||
expr, data_type, .. | ||
} => Ok(Expr::Cast { | ||
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. @b41sh Hi the pg_style can be set false at there? 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. We don't used 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. we can set select cast(a as int8) from test;
select a::int8 from test; I am working on this modification, you can set it as |
||
expr: Box::new(Self::clone_expr_with_replacement(&**expr, replacement_fn)?), | ||
data_type: data_type.clone(), | ||
pg_style: false, | ||
}), | ||
Expr::TryCast { expr, data_type } => Ok(Expr::TryCast { | ||
expr: Box::new(Self::clone_expr_with_replacement(&**expr, replacement_fn)?), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ | |
0 | ||
1 | ||
1 1 | ||
1 1 | ||
1 1 |
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.
Does the new version of sqlparser introduced
pg_style
params?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.
datafuse-extras/sqlparser-rs@b0571e8
Yes in this commit.
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.
O, @b41sh should know it better :D