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/06/23 06:32:46 UTC

[PR] Add Oracle alternative quoted literal parser support [shardingsphere]

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

   (no comment)


-- 
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] Add Oracle alternative quoted literal parser support [shardingsphere]

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


-- 
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] Add Oracle alternative quoted literal parser support [shardingsphere]

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

   ### Summary
   
   **Review Result: Mergeable**
   
   **Reason:** The PR follows the existing Oracle parser style: the lexer grammar remains declarative, no Java action/predicate is added to `.g4`, and `OracleLexer` remains a thin wrapper. The change adds focused Oracle alternative quoted literal support, keeps parameter marker counting correct when `?` appears inside the literal text, and includes direct parser IT coverage for the supported scenarios.
   
   ### Evidence
   
   - `parser/sql/engine/dialect/oracle/src/main/antlr4/imports/oracle/Literals.g4` adds `ALTERNATIVE_QUOTED_TEXT` as ordinary lexer alternatives, including the paired bracket cases and the right-delimiter self-closing cases needed by this PR.
   - `parser/sql/engine/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/engine/oracle/visitor/statement/OracleStatementVisitor.java` converts alternative quoted literal text into the expected string literal value and skips alternative quoted literal contents while counting `?` parameter markers.
   - Parser IT fixtures cover:
     - `nq'[national text]'`
     - `q']right delimiter]'`
     - `q'[John's ?]' AS content, ? AS status`
   
   The implementation does not change shared parser infrastructure, public APIs, SPI contracts, generated resources, dependencies, packaging, or distribution metadata.
   
   ### Review Details
   
   **Reviewed Scope:** Oracle SQL parser changes in:
   - `parser/sql/engine/dialect/oracle/src/main/antlr4/imports/oracle/Literals.g4`
   - `parser/sql/engine/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/engine/oracle/visitor/statement/OracleStatementVisitor.java`
   - `test/it/parser/src/main/resources/sql/supported/dml/select.xml`
   - `test/it/parser/src/main/resources/case/dml/select.xml`
   
   Target dialect: Oracle. No Oracle branch dialect is listed in the repository guidance, and the change is confined to Oracle parser files.
   
   Reviewed head: `4a6d99b`; local merge-base: `7ca70b5`.
   
   **Not Reviewed Scope:** Full GitHub Actions logs, Proxy/JDBC runtime behavior, release packaging, and distribution artifacts were not reviewed because this PR only changes Oracle SQL parser behavior and parser IT fixtures.
   
   **Verification:**
   - `./mvnw spotless:apply -Pcheck -T1C`: exit 0
   - `./mvnw checkstyle:check -Pcheck -T1C`: exit 0
   - `./mvnw -pl test/it/parser -am -DskipITs -Dspotless.skip=true -Dtest=org.apache.shardingsphere.test.it.sql.parser.oracle.InternalOracleParserIT -Dsurefire.failIfNoSpecifiedTests=false test`: exit 0
   
   **Release Note / User Docs:** Not required. This is a narrow Oracle parser compatibility enhancement and does not introduce user configuration, migration steps, API/SPI changes, or operational behavior changes.


-- 
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