my7ym commented on a change in pull request #1811: [CALCITE-3789] Support 
validation of UNNEST multiple array columns like Presto
URL: https://github.com/apache/calcite/pull/1811#discussion_r404539706
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
 ##########
 @@ -2219,6 +2207,42 @@ protected void convertFrom(
     }
   }
 
+  private List<String> getFieldAliases(SqlCall asCall) {
+    if (!validator.getConformance().allowAliasUnnestColumns()) {
+      return null;
+    }
+
+    List<String> columnAliases = new ArrayList<>();
+    for (SqlNode sqlNode : Util.skip(asCall.getOperandList(), 2)) {
+      columnAliases.add(((SqlIdentifier) sqlNode).getSimple());
+    }
+    return columnAliases;
+  }
+
+  private void convertUnnest(Blackboard bb, SqlCall from, List<String> 
fieldAliases) {
+    SqlCall call;
+    call = from;
+    final List<SqlNode> nodes = call.getOperandList();
+    final SqlUnnestOperator operator = (SqlUnnestOperator) call.getOperator();
+    for (SqlNode node : nodes) {
+      replaceSubQueries(bb, node, RelOptUtil.Logic.TRUE_FALSE_UNKNOWN);
+    }
+    final List<RexNode> exprs = new ArrayList<>();
+    final List<String> fieldNames = new ArrayList<>();
 
 Review comment:
   Done. btw this logic is there already before I extract it as a separate 
method. I usually avoid to touch unnecessary part as much as possible.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to