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_r404532978
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/Uncollect.java
 ##########
 @@ -46,21 +46,26 @@
 public class Uncollect extends SingleRel {
   public final boolean withOrdinality;
 
+  // To alias the items in Uncollect list, e.g., a, b, c in UNNEST(a, b, c),
+  // instead of fields within a struct field
+  private final List<String> fieldAliases;
+
   //~ Constructors -----------------------------------------------------------
 
   @Deprecated // to be removed before 2.0
   public Uncollect(RelOptCluster cluster, RelTraitSet traitSet,
       RelNode child) {
-    this(cluster, traitSet, child, false);
+    this(cluster, traitSet, child, false, null);
   }
 
   /** Creates an Uncollect.
    *
    * <p>Use {@link #create} unless you know what you're doing. */
   public Uncollect(RelOptCluster cluster, RelTraitSet traitSet, RelNode input,
-      boolean withOrdinality) {
+      boolean withOrdinality, List<String> fieldAliases) {
     super(cluster, traitSet, input);
     this.withOrdinality = withOrdinality;
+    this.fieldAliases = fieldAliases;
 
 Review comment:
   Done. Usually I think null is a separate state to flag something other than 
empty. But here they seem to be the same and we have extra bonus to avoid NPE. 
Good call.

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