-
Notifications
You must be signed in to change notification settings - Fork 1.5k
chore(deps): Update sqlparser to 0.56.0 #16456
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
base: main
Are you sure you want to change the base?
Conversation
Ok(Expr::ScalarFunction(ScalarFunction::new_udf( | ||
fun, | ||
substring_args, | ||
))) |
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.
Without this change the test fails:
#[test]
fn test_order_by_to_sql_3() {
let statement = generate_round_trip_statement(
GenericDialect {},
r#"SELECT id, first_name, substr(first_name,0,5) FROM person ORDER BY id, substr(first_name,0,5)"#,
);
assert_snapshot!(
statement,
@r#"SELECT person.id, person.first_name, substr(person.first_name, 0, 5) FROM person ORDER BY person.id ASC NULLS LAST, substr(person.first_name, 0, 5) ASC NULLS LAST"#
);
}
In the previous version substr were hitting:
SQLExpr::Function(function) => {
self.sql_function_to_expr(function, schema, planner_context)
}
now it's hitting:
SQLExpr::Substring {
expr,
substring_from,
substring_for,
special: _,
shorthand: _,
} => self.sql_substring_to_expr(
expr,
substring_from,
substring_for,
schema,
planner_context,
),
Open for suggestions if there is a better way to handle it.
@@ -739,6 +739,12 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { | |||
| SQLDataType::AnyType | |||
| SQLDataType::Table(_) | |||
| SQLDataType::VarBit(_) | |||
| SQLDataType::UTinyInt | |||
| SQLDataType::USmallInt |
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.
Not sure if the new data types should be handled here or Unsupported SQL type is fine.
settings: None, | ||
format_clause: None, | ||
}; | ||
let sub_plan = self.query_to_plan(query, planner_context)?; |
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.
Not sure if I should create a new set_expr_to_plan
function or wrapping subquery and passing it to query_to_plan
is fine.
(converted to draft while I'm investigating CI failures) |
(one of the test failures is related to #1898 and would be fixed if that patch is backported to 0.56) |
Which issue does this PR close?
Rationale for this change
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?