iffyio commented on code in PR #2168:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2168#discussion_r2745504000
##########
tests/sqlparser_postgres.rs:
##########
@@ -512,6 +512,12 @@ fn parse_create_table_with_defaults() {
}
}
+#[test]
+fn parse_default_expr_parenthesized_then_cast() {
Review Comment:
```suggestion
fn parse_cast_operator_in_column_option() {
```
##########
tests/sqlparser_postgres.rs:
##########
@@ -512,6 +512,12 @@ fn parse_create_table_with_defaults() {
}
}
+#[test]
+fn parse_default_expr_parenthesized_then_cast() {
+ // Infix operators like :: after parenthesized expression in DEFAULT
+ pg().verified_stmt("CREATE TABLE t (c TEXT DEFAULT (foo())::TEXT)");
Review Comment:
```suggestion
pg().verified_stmt("CREATE TABLE t (c TEXT DEFAULT (foo())::TEXT NOT
NULL)");
```
to test the behavior with the not null clause
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]