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)
"Warehouses" 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]