-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
parser: Add IMPORT INTO prototype syntax #37450
Conversation
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 but please do something about the split in two commits, see comment below.
Reviewed 1 of 1 files at r1, 6 of 7 files at r2.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @dt, @knz, and @lucy-zhang)
pkg/sql/parser/sql.y, line 1788 at r1 (raw file):
$$.val = &tree.Import{Table: &name, CreateDefs: $5.tblDefs(), FileFormat: $7, Files: $10.exprs(), Options: $12.kvOptions()} } | IMPORT INTO table_name import_format DATA '(' string_or_placeholder_list ')' opt_with_options
This change in the 1st commit should be migrated to the 2nd, OR you can move the change to parse_test.go back to the first, OR you can squash the two things.
Expand a couple contractions and fix missing quotes. This has the nice side effect of making the file highlight correctly even for syntax highlighers that don't respect comments for quote-matching. Release note: none.
Release note: None
whoops, nice catch! |
bors r+ |
37366: sql: don't exclude unvalidated check constraints r=lucy-zhang a=lucy-zhang Previously, as of 19.1, AllActiveAndInactiveChecks(), which gets check constraints for ALTER TABLE as well as SHOW CONSTRAINT, etc., excluded unvalidated checks on the table descriptor, under the assumption that all checks would be validated once they'd been added to the table descriptor. This was to avoid double-counting constraints that were both on the table descriptor and in the list of mutations. This caused unvalidated checks added in earlier versions to disappear (though they are still on the table descriptor itself, and are still enforced for writes). This PR fixes the issue by only excluding `Validating` checks on the table descriptor to avoid double-counting. Fixes #37285. Release note (bug fix): Fixes bug where unvalidated check constraints disappear from the output of SHOW CONSTRAINT and cannot be referenced in ALTER TABLE after upgrading to 19.1. 37450: parser: Add IMPORT INTO prototype syntax r=dt a=dt Breaking this out of the implementation PR. Release note: None Co-authored-by: Lucy Zhang <lucy-zhang@users.noreply.github.com> Co-authored-by: David Taylor <tinystatemachine@gmail.com>
Breaking this out of the implementation PR.
Release note: None