You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2026/08/22 13:37:17 UTC

[PR] Support parsing Oracle CREATE TABLE object table properties and single XMLType virtual column [shardingsphere]

terrymanu opened a new pull request, #39563:
URL: https://github.com/apache/shardingsphere/pull/39563

   - Expand objectProperties into a comma-separated list in createObjectTableClause and createXMLTypeTableClause
   - Allow a single virtual column in xmlTypeVirtualColumnsClause
   - Add parser IT cases for object table properties, PIVOT CTAS with aggregate alias, object-type column, and XMLType table with BINARY XML storage, virtual columns and range partitioning
   
   Closes #27103
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Support parsing Oracle CREATE TABLE object table properties and single XMLType virtual column [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #39563:
URL: https://github.com/apache/shardingsphere/pull/39563


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Support parsing Oracle CREATE TABLE object table properties and single XMLType virtual column [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on PR #39563:
URL: https://github.com/apache/shardingsphere/pull/39563#issuecomment-5380718513

   ### Result
   
   **Review Result: Mergeable**
   
   PR #39563 (head `dab497e`) correctly fixes the two remaining Oracle CREATE TABLE parsing gaps from issue #27103. The grammar changes match official Oracle 19c syntax, are backward compatible, and are fully covered by tests with no regression in the full Oracle parser IT suite. This verdict reflects code-scope readiness only; CI was not reviewed.
   
   ### Evidence
   
   - **Scope confirmation**: local `HEAD` equals the public head `dab497e`; the single-commit patch is byte-identical to GitHub `/pulls/39563/files` (differing only in abbreviated blob hash length); the inventory script matched local and GitHub changed files 3/3.
   - **Grammar fix 1 (object table property list)**: `parser/sql/engine/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:306` and `:251` expand `objectProperties` into a comma-separated list. The official Oracle 19c SQL Reference CREATE TABLE example `CREATE TABLE persons OF person ( homeaddress NOT NULL, UNIQUE (homeaddress.phone), CHECK ... )` uses exactly this comma-separated property list (source: docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/CREATE-TABLE.html).
   - **Grammar fix 2 (single virtual column)**: `DDLStatement.g4:276` relaxes `(COMMA_ ...)+` to `*`. The official `xmltype_virtual_columns` notation is `VIRTUAL COLUMNS ( column AS (expr) [, column AS (expr)]... )` — first column mandatory, repetitions optional, so a single column is valid (source: docs.oracle.com/en/database/oracle/oracle-database/19/sqlrf/img_text/xmltype_virtual_columns.html).
   - **Compatibility**: both edits are relaxations where zero repetitions equals the previous behavior; the third usage site (`DDLStatement.g4:1261`, nested table column properties) already had list expansion and is untouched; visitor and statement model changes are zero; the object-table expected case asserts only the table name, consistent with the PostgreSQL `create_table_of_type` and existing `create_object_table` precedents.
   - **Verification** (executed in this session on the same head): `./mvnw -pl parser/sql/engine/dialect/oracle,test/it/parser -Dtest=InternalOracleParserIT test` → 1907 run / 0 fail / 0 error, exit 0 (including the 4 new cases); direct parse check of the 5 original SQL statements from issue #27103 → 5/5 pass; `spotless:apply -Pcheck` exit 0 with no further changes; `checkstyle:check -Pcheck` exit 0.
   - **All candidates rejected**: ANTLR ambiguity (counter-evidence: full IT suite green), weak expected-case assertions (matches repository precedent), CHECK constraints not extracted into segments (pre-existing visitor behavior, outside this PR's scope), missing `case-types` (consistent with existing Oracle cases).
   
   ### Coverage
   
   - Reviewed the latest PR #39563 head `dab497e` (1 commit, +61/−3, 3 files); requirements derive from the 5 official Oracle example SQL statements in issue #27103.
   - All 3 behavior clusters reviewed: object/XMLType table property comma list, single virtual column relaxation, and IT cases with expected indices (index correctness proven by passing IT assertions). All 3 changed files are mapped to clusters; no churn-only files.
   - Three discovery lenses (root cause and behavior, blast radius and contracts, tests/runtime/operations) plus the convergence pass completed with 0 new independent candidates.
   - Dialect impact: Oracle only (trunk dialect, no branch dialects); no shared parser code touched. Official documentation used: Oracle 19c SQL Reference CREATE TABLE page plus the `object_table` and `xmltype_virtual_columns` diagram-text pages. No repo docs/examples require syncing (parse-capability extension only, no documented syntax surface changed).
   - Non-blocking suggestion: the precedent PR #38667 in the same series added a `RELEASE-NOTES.md` entry at maintainer request before merge; this PR could pre-emptively add one to the 5.5.4 section (e.g. `SQL Parser: Support parsing Oracle CREATE TABLE object table properties and single XMLType virtual column - #39563`) to avoid a review round-trip.
   - Not reviewed: CI/Actions were neither queried nor assessed (Code Correctness Review scope); for a merge readiness judgment including required checks, request a separate Mergeability Review.


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org