-
Notifications
You must be signed in to change notification settings - Fork 466
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
sql: change IGNORE COLUMNS MySQL option to EXCLUDE COLUMNS #29438
Conversation
( ( ',' 'IGNORE COLUMNS' ('(' (column_name) ( ( ',' column_name ) )* ')')? ')' )? ) | ||
( ( ',' 'EXCLUDE COLUMNS' ('(' (column_name) ( ( ',' column_name ) )* ')')? ')' )? ) |
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.
( ( ',' 'IGNORE COLUMNS' ('(' (column_name) ( ( ',' column_name ) )* ')')? ')' )? ) | |
( ( ',' 'EXCLUDE COLUMNS' ('(' (column_name) ( ( ',' column_name ) )* ')')? ')' )? ) | |
( ( ',' ('IGNORE COLUMNS' | 'EXCLUDE COLUMNS' ) ('(' (column_name) ( ( ',' column_name ) )* ')')? ')' )? ) |
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.
Ah sorry, I missed this suggestion. Going to merge this while CI is green, but I'll circle back on this next Thursday when I remove the IGNORE COLUMNS
from the syntax diagram entirely.
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.
Left a minor suggestion for the railroad diagram, but syntax and documentation changes look good to me.
@@ -37,14 +37,14 @@ contains: unsupported type | |||
|
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.
change the filename?
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.
Good eye, done.
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.
LGTM from an Adapter and SQL council perspective
ce5bdd7
to
c948839
Compare
We want to align this option with the forthcoming analogous option for sinks (#27758). In the context of sinks, "EXCLUDE" reads better than "IGNORE", because the columns aren't wholly ignored. Rather, they're allowed to be referenced in the PARTITION BY expression and the HEADERS option--they're just *excluded* from the final value. EXCLUDE also nicely aligns with the `SELECT ... EXCLUDE` syntax that was recently added to DuckDB and Snowflake. For backwards compatibility, the `IGNORE COLUMNS` option for the MySQL source continues to be accepted as an alias for `EXCLUDE COLUMNS`.
c948839
to
1bf4874
Compare
We want to align this option with the forthcoming analogous option for sinks (#27758). In the context of sinks, "EXCLUDE" reads better than "IGNORE", because the columns aren't wholly ignored. Rather, they're allowed to be referenced in the PARTITION BY expression and the HEADERS option--they're just excluded from the final value.
EXCLUDE also nicely aligns with the
SELECT ... EXCLUDE
syntax that was recently added to DuckDB and Snowflake.For backwards compatibility, the
IGNORE COLUMNS
option for the MySQL source continues to be accepted as an alias forEXCLUDE COLUMNS
.Motivation
Checklist
$T ⇔ Proto$T
mapping (possibly in a backwards-incompatible way), then it is tagged with aT-proto
label.