-
Notifications
You must be signed in to change notification settings - Fork 62
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
Support parsing for attribute and tuple level constraint #1442
Conversation
Conformance comparison report-Cross Engine
Number failing in both: 238 Number passing in legacy engine but fail in eval engine: 349 Number failing in legacy engine but pass in eval engine: 197 Conformance comparison report-Cross Commit-LEGACY
Number failing in both: 435 Number passing in Base (cc05d7f) but now fail: 0 Number failing in Base (cc05d7f) but now pass: 1 Click here to see
Conformance comparison report-Cross Commit-EVAL
Number failing in both: 587 Number passing in Base (cc05d7f) but now fail: 0 Number failing in Base (cc05d7f) but now pass: 0 |
}, | ||
], | ||
d_d_l::{ | ||
op: ddl_op |
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.
out of curiosity, what's the rationale behind creating a separate ddl_op
node rather than the previous modeling?
partiql-lang/src/test/kotlin/org/partiql/lang/syntax/PartiQLParserDDLTest.kt
Show resolved
Hide resolved
@@ -785,23 +788,27 @@ returning::{ | |||
// `( CONSTRAINT <column_constraint_name> )? <column_constraint_def>` | |||
table_definition::{ | |||
columns: list::[column], | |||
// table level constraints | |||
constraints: list::[constraint], | |||
_: [ | |||
column::{ |
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.
(naming) Should we keep the prior modeling as column
? In the PR description and the DDL BNF I looked at, the noun you currently use attribute
? I think the noun we use should be consistent.
partiql-parser/src/test/kotlin/org/partiql/parser/internal/PartiQLParserDDLTests.kt
Show resolved
Hide resolved
Co-authored-by: Alan Cai <[email protected]>
partiql-parser/src/main/kotlin/org/partiql/parser/internal/PartiQLParserDefault.kt
Show resolved
Hide resolved
; | ||
|
||
columnConstraintDef | ||
: NOT NULL # ColConstrNotNull | ||
| NULL # ColConstrNull | ||
: NOT NULL # ColConstrNotNull |
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.
Since the partiql-ast now uses "attribute" in the table definition, should the ANTLR definitions also use "attribute" rather than "column"? I think we should keep the parser and ast terminology consistent.
Related -- would the PIG parser also need to be updated to use "attribute"? Perhaps it does't matter since the PIG parser is getting deprecated.
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.
I think this is a valid call out. But given the fact that Antlr grammar is an internal concern, perhaps we can treat this as a backlog item?
I don't think we want to introduce changes to the PIG parser.
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.
At some point we would want to update the ANTLR grammar on our website. Perhaps then would be a good time to do those changes in batch?
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.
I think this is a valid call out. But given the fact that Antlr grammar is an internal concern, perhaps we can treat this as a backlog item?
Ah, I hadn't realized the current ANTLR-generated parse code was meant to be "internal" despite the visibility modifiers indicating it was "public". Created an issue to track the internalization of the ANTLR-generated sources -- #1446.
At some point we would want to update the ANTLR grammar on our website. Perhaps then would be a good time to do those changes in batch?
Since we'll likely have other changes to the ANTLR grammar before the DDL syntax is finalized, I'm fine w/ punting on the changes. Could you create an issue to track updating the website grammar and grammar within partiql-parser
? That should make it easier to track what'll need changed before the next release.
…)" This reverts commit abfc58d
* Revert "V1 ddl extended keyword (#1455)" This reverts commit 2879f3a * Revert "struct subfield and list element type (#1449)" This reverts commit 23f6fee * Revert "run apiDump (#1447)" This reverts commit 607c4c0 * Revert "Support parsing for attribute and tuple level constraint (#1442)" This reverts commit abfc58d * fix post-revert build * submodule
Relevant Issues
Description
Change log for future reference:
Added
Changed
statementDDLCreateTable(...)
tostatementDDL(ddlOpCreateTable(....))
Other Information
Updated Unreleased Section in CHANGELOG: [YES/NO]
-No. Targeting V1 branch.
Any backward-incompatible changes? [YES/NO]
Any new external dependencies? [YES/NO]
Do your changes comply with the Contributing Guidelines
and Code Style Guidelines? [YES/NO]
Yes.
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.