xiedeyantu commented on code in PR #4589:
URL: https://github.com/apache/calcite/pull/4589#discussion_r2446309751


##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -1246,20 +1246,7 @@ private void substituteSubQuery(Blackboard bb, SubQuery 
subQuery) {
 
       if (!config.isExpand()) {
         if (query instanceof SqlNodeList) {
-          // convert
-          // select * from "scott".emp where sal > some (4000, 2000)
-          // to
-          // select * from "scott".emp where sal > some (VALUES (4000), (2000))
-          // The SqlNodeList become a RexSubQuery then optimized by 
SubQueryRemoveRule.
-          RelNode relNode = convertRowValues(bb, query,  (SqlNodeList) query, 
false, targetRowType);
-          final ImmutableList.Builder<RexNode> builder =
-              ImmutableList.builder();
-          for (SqlNode node : leftSqlKeys) {
-            builder.add(bb.convertExpression(node));
-          }
-          final ImmutableList<RexNode> list = builder.build();
-          assert relNode != null;
-          subQuery.expr = createSubquery(subQuery.node.getKind(), relNode, 
list, call);
+          convertInListToSubQuery(bb, subQuery, query, leftSqlKeys, 
targetRowType, call);

Review Comment:
   Thanks! I changed the method name.



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

Reply via email to