You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zhuruixuan (via GitHub)" <gi...@apache.org> on 2024/03/18 06:00:25 UTC

[PR] Enhance the support for Oracle SQL parsing [shardingsphere]

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

   Fixes #27098 .
   
   Changes proposed in this pull request:
     -Enhance the support for Oracle SQL parsing in ShardingSphere.
   
   ---
   
   Before committing this PR, I'm sure that I have checked the following options:
   - [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
   - [x] I have self-reviewed the commit code.
   - [x] I have (or in comment I request) added corresponding labels for the pull request.
   - [x] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
   - [x] I have made corresponding changes to the documentation.
   - [x] I have added corresponding unit tests for my 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


Re: [PR] Enhance the support for Oracle SQL parsing [shardingsphere]

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


-- 
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] Enhance the support for Oracle SQL parsing [shardingsphere]

Posted by "zhuruixuan (via GitHub)" <gi...@apache.org>.
zhuruixuan closed pull request #30526: Enhance the support for Oracle SQL parsing 
URL: https://github.com/apache/shardingsphere/pull/30526


-- 
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] Enhance the support for Oracle SQL parsing [shardingsphere]

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on code in PR #30526:
URL: https://github.com/apache/shardingsphere/pull/30526#discussion_r1527894357


##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:
##########
@@ -1030,7 +1030,7 @@ externalTableClause
     ;
 
 externalTableDataProps
-    : (DEFAULT DIRECTORY directoryName)? (ACCESS PARAMETERS ((opaqueFormatSpec) | USING CLOB subquery))? (LOCATION LP_ (directoryName COLON_)? locationSpecifier (COMMA_ (directoryName COLON_)? locationSpecifier)+ RP_)?
+    : (DEFAULT DIRECTORY directoryName)? (ACCESS PARAMETERS ((opaqueFormatSpec delimSpec )?|USING CLOB subquery))? (LOCATION LP_ (directoryName|(directoryName COLON_)? locationSpecifier (COMMA_ (directoryName COLON_)? locationSpecifier)+) RP_)?

Review Comment:
   Please remove extra white space after `delimSpec`, and add white space for `|`



##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:
##########
@@ -196,7 +196,7 @@ createDefinitionClause
 
 createXMLTypeTableClause
     : OF? XMLTYPE
-      (LP_ (objectProperties) RP_)?
+      (LP_ (objectProperties)  RP_)?

Review Comment:
   Please remove extra white space.
   



##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/BaseRule.g4:
##########
@@ -2164,3 +2164,23 @@ dbUserProxy
 dbUserProxyClauses
     : (WITH ((ROLE (ALL EXCEPT)? roleName (COMMA_ roleName)*) | NO ROLES))? (AUTHENTICATION REQUIRED | AUTHENTICATED USING PASSWORD)?
     ;
+
+delimSpec
+     : terminatedBySpec? optionallyEnclosedBySpec? lrtrimSpec?
+     ;
+
+terminatedBySpec
+     : TERMINATED BY (STRING_|WHITESPACE)
+     ;
+
+optionallyEnclosedBySpec
+     : OPTIONALLY? ENCLOSED BY STRING_ AND STRING_
+     ;
+
+lrtrimSpec
+     : LRTRIM
+     ;
+

Review Comment:
   Please these useless blank lines.



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