Skip to content

Conversation

yoavcloud
Copy link
Contributor

Added support for REMOVEQUOTES, COMPUPDATE and STATUPDATE.

@LucaCappelletti94
Copy link
Contributor

Do consider adding some tests for the newly added code.

@yoavcloud
Copy link
Contributor Author

Have you looked at tests/sqlparser_common.rs? The changes there represent all cases for the newly added options.

src/ast/mod.rs Outdated
Comment on lines 8718 to 8726
write!(
f,
"{}",
match *enabled {
Some(true) => " TRUE",
Some(false) => " FALSE",
_ => "",
}
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like it can be simplified as?

if let Some(enabled) = enabled {
    write!()
}

Keyword::ON,
Keyword::OFF,
]) {
Some(Keyword::PRESET) => None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this branch valid, we don't seem to expect it in the keywords?

@LucaCappelletti94
Copy link
Contributor

As far as I can understand, the changes made in tests/sqlparser_common.rs only check that the parse happens without failure, but not that it parses to the expected structs.

@yoavcloud
Copy link
Contributor Author

As far as I can understand, the changes made in tests/sqlparser_common.rs only check that the parse happens without failure, but not that it parses to the expected structs.

It tests the full SQL to AST and AST to SQL flow. The new options are added to an existing flow, not introducing new AST structs. The existing structs are covered in existing tests.

@yoavcloud yoavcloud force-pushed the redshift_copy_options_2510 branch from e44e613 to 72d7c5d Compare October 21, 2025 14:51
@yoavcloud yoavcloud requested a review from iffyio October 21, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants