zabetak commented on a change in pull request #1020: [CALCITE-2812] Add 
algebraic operators to allow expressing recursive queries (Ruben Quesada Lopez)
URL: https://github.com/apache/calcite/pull/1020#discussion_r276251059
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/Spool.java
 ##########
 @@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.calcite.rel.core;
+
+import org.apache.calcite.linq4j.function.Experimental;
+import org.apache.calcite.plan.RelOptCluster;
+import org.apache.calcite.plan.RelTraitSet;
+import org.apache.calcite.rel.RelNode;
+import org.apache.calcite.rel.RelWriter;
+import org.apache.calcite.rel.SingleRel;
+
+import java.util.List;
+
+/**
+ * Relational expression that consumes a set of data, and stores it in a 
temporary structure.
+ *
+ * <p>NOTE: The current API is experimental and subject to change without 
notice.</p>
+ */
+@Experimental
+public abstract class Spool extends SingleRel {
+
+  /**
+   * Enumeration representing spool read / write type (all four combinations 
are possible):
+   *   Read type
+   *     - EAGER: the spool will consume the data from its input at once at 
the initial request
+   *     - LAZY: the spool will consume the data from its input one by one by 
request
+   *   Write type
+   *     - EAGER: the spool will write each result as soon as it propagates it
+   *     - LAZY: the spool will write all results when it is done propagating 
all of them
+   */
+  public enum Type {
+    EAGER,
+    LAZY
+  }
+
+  protected final Type readType;
+  protected final Type writeType;
 
 Review comment:
   Make them public and get read of the accessors?

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