You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Qianyi951015 (via GitHub)" <gi...@apache.org> on 2023/08/01 09:34:16 UTC

[GitHub] [shardingsphere] Qianyi951015 opened a new pull request, #27613: Support Oracle Table Collection Expression & Arrow Symbol

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

   
   Changes proposed in this pull request:
     - Support Oracle Table Collection Expression & Arrow Symbol(=>)
   
   ---
   
   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`.
   - [ ] 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


[GitHub] [shardingsphere] Qianyi951015 closed pull request #27613: Support Oracle Table Collection Expression & Arrow Symbol

Posted by "Qianyi951015 (via GitHub)" <gi...@apache.org>.
Qianyi951015 closed pull request #27613: Support Oracle Table Collection Expression & Arrow Symbol
URL: https://github.com/apache/shardingsphere/pull/27613


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


[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #27613: Support Oracle Table Collection Expression & Arrow Symbol

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


##########
parser/sql/dialect/oracle/src/main/java/org/apache/shardingsphere/sql/parser/oracle/visitor/statement/type/OracleDMLStatementVisitor.java:
##########
@@ -413,6 +419,14 @@ public ASTNode visitDmlSubqueryClause(final DmlSubqueryClauseContext ctx) {
     
     @Override
     public ASTNode visitTableCollectionExpr(final TableCollectionExprContext ctx) {
+        SubqueryTableSegment result = new SubqueryTableSegment();
+        if (null != ctx.collectionExpr().functionCall()) {
+            result.setFunctionSegment((FunctionSegment) visit(ctx.collectionExpr().functionCall()));

Review Comment:
   Please do not add new segement in SubqueryTableSegment.



##########
test/it/parser/src/main/resources/sql/supported/dml/select-expression.xml:
##########
@@ -115,4 +115,5 @@
     <sql-case id="select_with_multiset_union_expression" value="SELECT customer_id, cust_address_ntab MULTISET UNION cust_address2_ntab multiset_union FROM customers_demo ORDER BY customer_id;" db-types="Oracle" />
     <sql-case id="select_collect_expression" value="SELECT CAST(COLLECT(warehouse_name ORDER BY warehouse_name) AS warehouse_name_t) &quot;Warehouses&quot; FROM warehouses;" db-types="Oracle" />
     <sql-case id="select_expr_dot_expr" value="SELECT DBURIType('/HR/DEPARTMENTS').getXML() FROM DUAL;" db-types="Oracle" />
+    <sql-case id="select_from_table_function" value="SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE(sql_handle=>'SYS_SQL_209d10fabbedc741', format=>'basic'));" db-types="Oracle" />

Review Comment:
   Maybe we can parse `TABLE(DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE(sql_handle=>'SYS_SQL_209d10fabbedc741', format=>'basic'))` as an subquey, just like `SELECT TABLE(DBMS_XPLAN.DISPLAY_SQL_PLAN_BASELINE(sql_handle=>'SYS_SQL_209d10fabbedc741', format=>'basic')) FROM DUAL`



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