You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jh...@apache.org on 2019/06/03 07:40:36 UTC

[calcite] branch master updated (b0e83c4 -> c4e61bd)

This is an automated email from the ASF dual-hosted git repository.

jhyde pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git.


    from b0e83c4  Following [CALCITE-2944] remove internal uses of Aggregate.indicator
     new c08ea8b  Cosmetic changes
     new 674c123  [CALCITE-3106] Upgrade commons-pool2 from 2.6.0 to 2.6.2 (Fokko Driesprong)
     new c4e61bd  [CALCITE-3107] Upgrade commons-dbcp2 from 2.5.0 to 2.6.0 (Fokko Driesprong)

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../adapter/enumerable/EnumerableRepeatUnion.java  | 20 +++-----
 .../adapter/enumerable/EnumerableTableSpool.java   | 16 ++++---
 .../enumerable/EnumerableTableSpoolRule.java       | 10 ++--
 .../calcite/config/CalciteSystemProperty.java      |  6 +--
 .../java/org/apache/calcite/rel/core/Join.java     |  2 +-
 .../org/apache/calcite/rel/core/RelFactories.java  | 14 +++---
 .../org/apache/calcite/rel/core/RepeatUnion.java   | 53 ++++++++++------------
 .../java/org/apache/calcite/rel/core/Spool.java    | 40 +++++++++-------
 .../org/apache/calcite/rel/core/TableSpool.java    | 11 +++--
 .../calcite/rel/logical/LogicalRepeatUnion.java    | 23 ++++------
 .../calcite/rel/logical/LogicalTableSpool.java     | 17 ++++---
 .../java/org/apache/calcite/tools/RelBuilder.java  | 42 ++++++++++-------
 .../test/enumerable/EnumerableRepeatUnionTest.java | 32 +++++--------
 pom.xml                                            |  4 +-
 site/_docs/history.md                              |  6 +--
 site/_docs/reference.md                            | 14 +++---
 16 files changed, 159 insertions(+), 151 deletions(-)


[calcite] 03/03: [CALCITE-3107] Upgrade commons-dbcp2 from 2.5.0 to 2.6.0 (Fokko Driesprong)

Posted by jh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jhyde pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit c4e61bd7ea9c3d636da2f5f22cf4cedad9047b80
Author: Fokko Driesprong <fo...@apache.org>
AuthorDate: Fri May 31 20:25:21 2019 +0200

    [CALCITE-3107] Upgrade commons-dbcp2 from 2.5.0 to 2.6.0 (Fokko Driesprong)
    
    Close apache/calcite#1249
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 678c9c9..26adc8a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,7 +73,7 @@ limitations under the License.
     <checksum-maven-plugin.version>1.2</checksum-maven-plugin.version>
     <chinook-data-hsqldb.version>0.1</chinook-data-hsqldb.version>
     <commons-codec.version>1.12</commons-codec.version>
-    <commons-dbcp2.version>2.5.0</commons-dbcp2.version>
+    <commons-dbcp2.version>2.6.0</commons-dbcp2.version>
     <commons-lang3.version>3.8</commons-lang3.version>
     <commons-pool2.version>2.6.2</commons-pool2.version>
     <elasticsearch.version>7.0.1</elasticsearch.version>


[calcite] 01/03: Cosmetic changes

Posted by jh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jhyde pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit c08ea8b39a5c7ed348459fd02c0ed91ccb9d834f
Author: Julian Hyde <jh...@apache.org>
AuthorDate: Thu May 30 11:08:30 2019 -0700

    Cosmetic changes
---
 .../adapter/enumerable/EnumerableRepeatUnion.java  | 20 +++-----
 .../adapter/enumerable/EnumerableTableSpool.java   | 16 ++++---
 .../enumerable/EnumerableTableSpoolRule.java       | 10 ++--
 .../calcite/config/CalciteSystemProperty.java      |  6 +--
 .../java/org/apache/calcite/rel/core/Join.java     |  2 +-
 .../org/apache/calcite/rel/core/RelFactories.java  | 14 +++---
 .../org/apache/calcite/rel/core/RepeatUnion.java   | 53 ++++++++++------------
 .../java/org/apache/calcite/rel/core/Spool.java    | 40 +++++++++-------
 .../org/apache/calcite/rel/core/TableSpool.java    | 11 +++--
 .../calcite/rel/logical/LogicalRepeatUnion.java    | 23 ++++------
 .../calcite/rel/logical/LogicalTableSpool.java     | 17 ++++---
 .../java/org/apache/calcite/tools/RelBuilder.java  | 42 ++++++++++-------
 .../test/enumerable/EnumerableRepeatUnionTest.java | 32 +++++--------
 site/_docs/history.md                              |  6 +--
 site/_docs/reference.md                            | 14 +++---
 15 files changed, 157 insertions(+), 149 deletions(-)

diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableRepeatUnion.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableRepeatUnion.java
index 1406b3b..c845070 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableRepeatUnion.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableRepeatUnion.java
@@ -28,27 +28,22 @@ import org.apache.calcite.util.BuiltInMethod;
 
 import java.util.List;
 
-
 /**
  * Implementation of {@link RepeatUnion} in
  * {@link EnumerableConvention enumerable calling convention}.
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public class EnumerableRepeatUnion extends RepeatUnion implements EnumerableRel {
 
   /**
-   * Creates an EnumerableRepeatUnion
+   * Creates an EnumerableRepeatUnion.
    */
-  EnumerableRepeatUnion(
-          RelOptCluster cluster,
-          RelTraitSet traits,
-          RelNode seed,
-          RelNode iterative,
-          boolean all,
-          int maxRep) {
-    super(cluster, traits, seed, iterative, all, maxRep);
+  EnumerableRepeatUnion(RelOptCluster cluster, RelTraitSet traitSet,
+      RelNode seed, RelNode iterative, boolean all, int maxRep) {
+    super(cluster, traitSet, seed, iterative, all, maxRep);
   }
 
   @Override public EnumerableRepeatUnion copy(RelTraitSet traitSet, List<RelNode> inputs) {
@@ -58,10 +53,9 @@ public class EnumerableRepeatUnion extends RepeatUnion implements EnumerableRel
   }
 
   @Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) {
-    // TODO only UNION ALL is supported for the moment
     if (!all) {
       throw new UnsupportedOperationException(
-          "Only EnumerableRepeatUnion ALL is supported for the moment");
+          "Only EnumerableRepeatUnion ALL is supported");
     }
 
     // return repeatUnionAll(<seedExp>, <iterativeExp>, maxRep);
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpool.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpool.java
index bde5b2a..6e726ec 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpool.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpool.java
@@ -34,21 +34,23 @@ import org.apache.calcite.util.BuiltInMethod;
 /**
  * Implementation of {@link TableSpool} in
  * {@link EnumerableConvention enumerable calling convention}
- * that writes into a {@link ModifiableTable} (which must exist in the current schema).
+ * that writes into a {@link ModifiableTable} (which must exist in the current
+ * schema).
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public class EnumerableTableSpool extends TableSpool implements EnumerableRel {
 
-  private EnumerableTableSpool(RelOptCluster cluster, RelTraitSet traitSet, RelNode input,
-                                 Type readType, Type writeType, String tableName) {
+  private EnumerableTableSpool(RelOptCluster cluster, RelTraitSet traitSet,
+      RelNode input, Type readType, Type writeType, String tableName) {
     super(cluster, traitSet, input, readType, writeType, tableName);
   }
 
   /** Creates an EnumerableTableSpool. */
-  public static EnumerableTableSpool create(RelNode input, Type readType, Type writeType,
-                                            String tableName) {
+  public static EnumerableTableSpool create(RelNode input, Type readType,
+      Type writeType, String tableName) {
     RelOptCluster cluster = input.getCluster();
     RelMetadataQuery mq = cluster.getMetadataQuery();
     RelTraitSet traitSet = cluster.traitSetOf(EnumerableConvention.INSTANCE)
@@ -102,7 +104,7 @@ public class EnumerableTableSpool extends TableSpool implements EnumerableRel {
   }
 
   @Override protected Spool copy(RelTraitSet traitSet, RelNode input,
-                                 Type readType, Type writeType) {
+      Type readType, Type writeType) {
     return new EnumerableTableSpool(input.getCluster(), traitSet, input,
         readType, writeType, tableName);
   }
diff --git a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpoolRule.java b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpoolRule.java
index 255ac47..27def0a 100644
--- a/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpoolRule.java
+++ b/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableTableSpoolRule.java
@@ -23,20 +23,20 @@ import org.apache.calcite.rel.convert.ConverterRule;
 import org.apache.calcite.rel.logical.LogicalTableSpool;
 
 /**
- * Rule to convert a {@link LogicalTableSpool} into an {@link EnumerableTableSpool}.
+ * Rule to convert a {@link LogicalTableSpool} into an
+ * {@link EnumerableTableSpool}.
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public class EnumerableTableSpoolRule extends ConverterRule {
 
   EnumerableTableSpoolRule() {
-    super(
-        LogicalTableSpool.class,
+    super(LogicalTableSpool.class,
         Convention.NONE,
         EnumerableConvention.INSTANCE,
         "EnumerableTableSpoolRule");
-
   }
 
   @Override public RelNode convert(RelNode rel) {
diff --git a/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java b/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java
index 92b1142..fe5ff08 100644
--- a/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java
+++ b/core/src/main/java/org/apache/calcite/config/CalciteSystemProperty.java
@@ -68,9 +68,9 @@ public final class CalciteSystemProperty<T> {
 
   /** Whether to enable the collation trait in the default planner configuration.
    *
-   * Some extra optimizations are possible if enabled, but queries should work either way.
-   * At some point this will become a preference, or we will run multiple phases: first
-   * disabled, then enabled. */
+   * <p>Some extra optimizations are possible if enabled, but queries should
+   * work either way. At some point this will become a preference, or we will
+   * run multiple phases: first disabled, then enabled. */
   public static final CalciteSystemProperty<Boolean> ENABLE_COLLATION_TRAIT =
       booleanProperty("calcite.enable.collation.trait", true);
 
diff --git a/core/src/main/java/org/apache/calcite/rel/core/Join.java b/core/src/main/java/org/apache/calcite/rel/core/Join.java
index 2c66c4d..f201a8d 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/Join.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/Join.java
@@ -182,7 +182,7 @@ public abstract class Join extends BiRel {
 
   @Override public RelOptCost computeSelfCost(RelOptPlanner planner,
       RelMetadataQuery mq) {
-    // Maybe we should remove this for semi-join ?
+    // Maybe we should remove this for semi-join?
     if (isSemiJoin()) {
       // REVIEW jvs 9-Apr-2006:  Just for now...
       return planner.getCostFactory().makeTinyCost();
diff --git a/core/src/main/java/org/apache/calcite/rel/core/RelFactories.java b/core/src/main/java/org/apache/calcite/rel/core/RelFactories.java
index ac8944f..6e9471e 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/RelFactories.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/RelFactories.java
@@ -598,8 +598,8 @@ public class RelFactories {
   @Experimental
   public interface SpoolFactory {
     /** Creates a {@link TableSpool}. */
-    RelNode createTableSpool(RelNode input, Spool.Type readType, Spool.Type writeType,
-                             String tableName);
+    RelNode createTableSpool(RelNode input, Spool.Type readType,
+        Spool.Type writeType, String tableName);
   }
 
   /**
@@ -607,8 +607,8 @@ public class RelFactories {
    * that returns Logical Spools.
    */
   private static class SpoolFactoryImpl implements SpoolFactory {
-    public RelNode createTableSpool(RelNode input, Spool.Type readType, Spool.Type writeType,
-                                    String tableName) {
+    public RelNode createTableSpool(RelNode input, Spool.Type readType,
+        Spool.Type writeType, String tableName) {
       return LogicalTableSpool.create(input, readType, writeType, tableName);
     }
   }
@@ -620,7 +620,8 @@ public class RelFactories {
   @Experimental
   public interface RepeatUnionFactory {
     /** Creates a {@link RepeatUnion}. */
-    RelNode createRepeatUnion(RelNode seed, RelNode iterative, boolean all, int maxRep);
+    RelNode createRepeatUnion(RelNode seed, RelNode iterative, boolean all,
+        int maxRep);
   }
 
   /**
@@ -628,7 +629,8 @@ public class RelFactories {
    * that returns a {@link LogicalRepeatUnion}.
    */
   private static class RepeatUnionFactoryImpl implements RepeatUnionFactory {
-    public RelNode createRepeatUnion(RelNode seed, RelNode iterative, boolean all, int maxRep) {
+    public RelNode createRepeatUnion(RelNode seed, RelNode iterative,
+        boolean all, int maxRep) {
       return LogicalRepeatUnion.create(seed, iterative, all, maxRep);
     }
   }
diff --git a/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java b/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java
index 37e00dd..8d8eb52 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/RepeatUnion.java
@@ -31,44 +31,41 @@ import com.google.common.collect.Lists;
 import java.util.List;
 
 /**
- * Relational expression that computes a Repeat Union (Recursive Union in SQL terminology).
+ * Relational expression that computes a repeat union (recursive union in SQL
+ * terminology).
  *
- * This operation is executed as follows:
- *  <ul>
- *   <li>Evaluate the left input (i.e., seed relational expression) once.
- *   For UNION (but not UNION ALL), discard duplicated rows.</li>
- *   <li>Evaluate the right input (i.e., iterative relational expression) over and over until it
- *   produces no more results (or until an optional maximum number of iterations is reached).
- *   For UNION (but not UNION ALL), discard duplicated results.</li>
- *  </ul>
+ * <p>This operation is executed as follows:
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <ul>
+ * <li>Evaluate the left input (i.e., seed relational expression) once.  For
+ *   UNION (but not UNION ALL), discard duplicated rows.
+ *
+ * <li>Evaluate the right input (i.e., iterative relational expression) over and
+ *   over until it produces no more results (or until an optional maximum number
+ *   of iterations is reached).  For UNION (but not UNION ALL), discard
+ *   duplicated results.
+ * </ul>
+ *
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public abstract class RepeatUnion extends BiRel {
 
   /**
-   * Whether duplicates will be considered or not
+   * Whether duplicates are considered.
    */
   public final boolean all;
 
   /**
-   * Maximum number of times to repeat the iterative relational expression,
-   * -1 means no limit, 0 means only seed will be evaluated
+   * Maximum number of times to repeat the iterative relational expression; -1
+   * means no limit, 0 means only seed will be evaluated
    */
   public final int maxRep;
 
-
-
   //~ Constructors -----------------------------------------------------------
-  protected RepeatUnion(
-          RelOptCluster cluster,
-          RelTraitSet traitSet,
-          RelNode seed,
-          RelNode iterative,
-          boolean all,
-          int maxRep) {
-
+  protected RepeatUnion(RelOptCluster cluster, RelTraitSet traitSet,
+      RelNode seed, RelNode iterative, boolean all, int maxRep) {
     super(cluster, traitSet, seed, iterative);
     if (maxRep < -1) {
       throw new IllegalArgumentException("Wrong maxRep value");
@@ -84,7 +81,7 @@ public abstract class RepeatUnion extends BiRel {
       return seedRowCount;
     }
     return seedRowCount
-              + mq.getRowCount(getIterativeRel()) * (maxRep != -1 ? maxRep : 10);
+        + mq.getRowCount(getIterativeRel()) * (maxRep != -1 ? maxRep : 10);
   }
 
   @Override public RelWriter explainTerms(RelWriter pw) {
@@ -105,13 +102,13 @@ public abstract class RepeatUnion extends BiRel {
 
   @Override protected RelDataType deriveRowType() {
     final List<RelDataType> inputRowTypes =
-            Lists.transform(getInputs(), RelNode::getRowType);
+        Lists.transform(getInputs(), RelNode::getRowType);
     final RelDataType rowType =
-            getCluster().getTypeFactory().leastRestrictive(inputRowTypes);
+        getCluster().getTypeFactory().leastRestrictive(inputRowTypes);
     if (rowType == null) {
       throw new IllegalArgumentException("Cannot compute compatible row type "
-              + "for arguments: "
-              + Util.sepList(inputRowTypes, ", "));
+          + "for arguments: "
+          + Util.sepList(inputRowTypes, ", "));
     }
     return rowType;
   }
diff --git a/core/src/main/java/org/apache/calcite/rel/core/Spool.java b/core/src/main/java/org/apache/calcite/rel/core/Spool.java
index 2287364..da244bd 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/Spool.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/Spool.java
@@ -24,12 +24,14 @@ import org.apache.calcite.rel.RelWriter;
 import org.apache.calcite.rel.SingleRel;
 
 import java.util.List;
+import java.util.Objects;
 
 /**
- * Relational expression that iterates over its input and, apart from returning its results,
- * will forward them into other consumers.
+ * Relational expression that iterates over its input and, in addition to
+ * returning its results, will forward them into other consumers.
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public abstract class Spool extends SingleRel {
@@ -43,39 +45,45 @@ public abstract class Spool extends SingleRel {
   }
 
   /**
-   * The way the spool consumes elements from its input.
+   * How the spool consumes elements from its input.
+   *
    * <ul>
-   *  <li>EAGER: the spool will consume the elements from its input at once at the initial request.
-   *  </li>
-   *   <li>LAZY: the spool will consume the elements from its input one by one by request.</li>
+   * <li>EAGER: the spool consumes the elements from its input at once at the
+   *     initial request;
+   * <li>LAZY: the spool consumes the elements from its input one by one by
+   *     request.
    * </ul>
    */
   public final Type readType;
+
   /**
-   * The way the spool forwards elements to consumers.
+   * How the spool forwards elements to consumers.
+   *
    * <ul>
-   *   <li>EAGER: the spool will forward each element as soon as it returns it.</li>
-   *   <li>LAZY: the spool will forward all elements at once when it is done retuning all of them.
-   *   </li>
+   * <li>EAGER: the spool forwards each element as soon as it returns it;
+   * <li>LAZY: the spool forwards all elements at once when it is done returning
+   *     all of them.
    * </ul>
    */
   public final Type writeType;
 
   //~ Constructors -----------------------------------------------------------
+
+  /** Creates a Spool. */
   protected Spool(RelOptCluster cluster, RelTraitSet traitSet, RelNode input,
-                  Type readType, Type writeType) {
+      Type readType, Type writeType) {
     super(cluster, traitSet, input);
-    this.readType = readType;
-    this.writeType = writeType;
+    this.readType = Objects.requireNonNull(readType);
+    this.writeType = Objects.requireNonNull(writeType);
   }
 
   @Override public final RelNode copy(RelTraitSet traitSet,
-                                      List<RelNode> inputs) {
+      List<RelNode> inputs) {
     return copy(traitSet, sole(inputs), readType, writeType);
   }
 
   protected abstract Spool copy(RelTraitSet traitSet, RelNode input,
-                                Type readType, Type writeType);
+      Type readType, Type writeType);
 
   @Override public RelWriter explainTerms(RelWriter pw) {
     return super.explainTerms(pw)
diff --git a/core/src/main/java/org/apache/calcite/rel/core/TableSpool.java b/core/src/main/java/org/apache/calcite/rel/core/TableSpool.java
index 1e46a81..d7d8bc7 100644
--- a/core/src/main/java/org/apache/calcite/rel/core/TableSpool.java
+++ b/core/src/main/java/org/apache/calcite/rel/core/TableSpool.java
@@ -22,20 +22,23 @@ import org.apache.calcite.plan.RelTraitSet;
 import org.apache.calcite.rel.RelNode;
 import org.apache.calcite.rel.RelWriter;
 
+import java.util.Objects;
+
 /**
  * Spool that writes into a table.
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public abstract class TableSpool extends Spool {
 
   protected final String tableName;
 
-  protected TableSpool(RelOptCluster cluster, RelTraitSet traitSet, RelNode input,
-                    Type readType, Type writeType, String tableName) {
+  protected TableSpool(RelOptCluster cluster, RelTraitSet traitSet,
+      RelNode input, Type readType, Type writeType, String tableName) {
     super(cluster, traitSet, input, readType, writeType);
-    this.tableName = tableName;
+    this.tableName = Objects.requireNonNull(tableName);
   }
 
   public String getTableName() {
diff --git a/core/src/main/java/org/apache/calcite/rel/logical/LogicalRepeatUnion.java b/core/src/main/java/org/apache/calcite/rel/logical/LogicalRepeatUnion.java
index d2dd729..c0c0a32 100644
--- a/core/src/main/java/org/apache/calcite/rel/logical/LogicalRepeatUnion.java
+++ b/core/src/main/java/org/apache/calcite/rel/logical/LogicalRepeatUnion.java
@@ -29,30 +29,27 @@ import java.util.List;
  * Sub-class of {@link org.apache.calcite.rel.core.RepeatUnion}
  * not targeted at any particular engine or calling convention.
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public class LogicalRepeatUnion extends RepeatUnion {
 
   //~ Constructors -----------------------------------------------------------
-  private LogicalRepeatUnion(
-            RelOptCluster cluster,
-            RelTraitSet traitSet,
-            RelNode seed,
-            RelNode iterative,
-            boolean all,
-            int maxRep) {
+  private LogicalRepeatUnion(RelOptCluster cluster, RelTraitSet traitSet,
+      RelNode seed, RelNode iterative, boolean all, int maxRep) {
     super(cluster, traitSet, seed, iterative, all, maxRep);
   }
 
   /** Creates a LogicalRepeatUnion. */
-  public static LogicalRepeatUnion create(RelNode seed, RelNode iterative, boolean all) {
+  public static LogicalRepeatUnion create(RelNode seed, RelNode iterative,
+      boolean all) {
     return create(seed, iterative, all, -1);
   }
 
   /** Creates a LogicalRepeatUnion. */
-  public static LogicalRepeatUnion create(RelNode seed, RelNode iterative, boolean all,
-                                          int maxRep) {
+  public static LogicalRepeatUnion create(RelNode seed, RelNode iterative,
+      boolean all, int maxRep) {
     RelOptCluster cluster = seed.getCluster();
     RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE);
     return new LogicalRepeatUnion(cluster, traitSet, seed, iterative, all, maxRep);
@@ -60,13 +57,13 @@ public class LogicalRepeatUnion extends RepeatUnion {
 
   //~ Methods ----------------------------------------------------------------
 
-  @Override public LogicalRepeatUnion copy(RelTraitSet traitSet, List<RelNode> inputs) {
+  @Override public LogicalRepeatUnion copy(RelTraitSet traitSet,
+      List<RelNode> inputs) {
     assert traitSet.containsIfApplicable(Convention.NONE);
     assert inputs.size() == 2;
     return new LogicalRepeatUnion(getCluster(), traitSet,
         inputs.get(0), inputs.get(1), all, maxRep);
   }
-
 }
 
 // End LogicalRepeatUnion.java
diff --git a/core/src/main/java/org/apache/calcite/rel/logical/LogicalTableSpool.java b/core/src/main/java/org/apache/calcite/rel/logical/LogicalTableSpool.java
index b0a2a14..8b02985 100644
--- a/core/src/main/java/org/apache/calcite/rel/logical/LogicalTableSpool.java
+++ b/core/src/main/java/org/apache/calcite/rel/logical/LogicalTableSpool.java
@@ -28,22 +28,24 @@ import org.apache.calcite.rel.core.TableSpool;
 import org.apache.calcite.rel.metadata.RelMetadataQuery;
 
 /**
- * Sub-class of {@link TableSpool} not targeted at any particular engine or calling convention.
+ * Sub-class of {@link TableSpool} not targeted at any particular engine or
+ * calling convention.
  *
- * <p>NOTE: The current API is experimental and subject to change without notice.</p>
+ * <p>NOTE: The current API is experimental and subject to change without
+ * notice.
  */
 @Experimental
 public class LogicalTableSpool extends TableSpool {
 
   //~ Constructors -----------------------------------------------------------
   public LogicalTableSpool(RelOptCluster cluster, RelTraitSet traitSet, RelNode input,
-                           Type readType, Type writeType, String tableName) {
+      Type readType, Type writeType, String tableName) {
     super(cluster, traitSet, input, readType, writeType, tableName);
   }
 
   /** Creates a LogicalTableSpool. */
-  public static LogicalTableSpool create(RelNode input, Type readType, Type writeType,
-                                         String tableName) {
+  public static LogicalTableSpool create(RelNode input, Type readType,
+      Type writeType, String tableName) {
     RelOptCluster cluster = input.getCluster();
     RelMetadataQuery mq = cluster.getMetadataQuery();
     RelTraitSet traitSet = cluster.traitSetOf(Convention.NONE)
@@ -51,13 +53,14 @@ public class LogicalTableSpool extends TableSpool {
             () -> mq.collations(input))
         .replaceIf(RelDistributionTraitDef.INSTANCE,
             () -> mq.distribution(input));
-    return new LogicalTableSpool(cluster, traitSet, input, readType, writeType, tableName);
+    return new LogicalTableSpool(cluster, traitSet, input, readType, writeType,
+        tableName);
   }
 
   //~ Methods ----------------------------------------------------------------
 
   @Override protected Spool copy(RelTraitSet traitSet, RelNode input,
-                                 Type readType, Type writeType) {
+      Type readType, Type writeType) {
     return new LogicalTableSpool(input.getCluster(), traitSet, input,
         readType, writeType, tableName);
   }
diff --git a/core/src/main/java/org/apache/calcite/tools/RelBuilder.java b/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
index cfb7708..5ee0ec9 100644
--- a/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
+++ b/core/src/main/java/org/apache/calcite/tools/RelBuilder.java
@@ -1752,13 +1752,14 @@ public class RelBuilder {
   }
 
   /**
-   * Creates a {@link TableSpool} for the most recent relation expression.
+   * Creates a {@link TableSpool} for the most recent relational expression.
    *
-   * @param readType spool's read type (as described in {@link Spool.Type})
-   * @param writeType spool's write type (as described in {@link Spool.Type})
-   * @param tableName table name
+   * @param readType Spool's read type (as described in {@link Spool.Type})
+   * @param writeType Spool's write type (as described in {@link Spool.Type})
+   * @param tableName Table name
    */
-  private RelBuilder tableSpool(Spool.Type readType, Spool.Type writeType, String tableName) {
+  private RelBuilder tableSpool(Spool.Type readType, Spool.Type writeType,
+      String tableName) {
     RelNode spool =  spoolFactory.createTableSpool(peek(), readType, writeType, tableName);
     replaceTop(spool);
     return this;
@@ -1777,19 +1778,28 @@ public class RelBuilder {
   }
 
   /**
-   * Creates a {@link RepeatUnion} associated to a {@link TransientTable} of the two most recent
-   * relational expressions on the stack. Warning: if these relational expressions are not
+   * Creates a {@link RepeatUnion} associated to a {@link TransientTable} of the
+   * two most recent relational expressions on the stack.
+   *
+   * <p>Warning: if these relational expressions are not
    * correctly defined, this operation might lead to an infinite loop.
-   * The generated {@link RepeatUnion} will:
-   *   - Evaluate its left term once, propagating the results into the {@link TransientTable}.
-   *   - Evaluate its right term (which may contain a {@link TableScan} on the
-   *   {@link TransientTable}) over and over until it produces no more results (or until an
-   *   optional maximum number of iterations is reached). On each iteration, the results will be
-   *   propagated into the {@link TransientTable}, overwriting the results from the previous one.
    *
-   * @param tableName name of the {@link TransientTable} associated to the {@link RepeatUnion}
-   * @param all whether duplicates will be considered or not
-   * @param maxRep maximum number of iterations, -1 means no limit
+   * <p>The generated {@link RepeatUnion} operates as follows:
+   *
+   * <ul>
+   * <li>Evaluate its left term once, propagating the results into the
+   *     {@link TransientTable};
+   * <li>Evaluate its right term (which may contain a {@link TableScan} on the
+   *     {@link TransientTable}) over and over until it produces no more results
+   *     (or until an optional maximum number of iterations is reached). On each
+   *     iteration, the results are propagated into the {@link TransientTable},
+   *     overwriting the results from the previous one.
+   * </ul>
+   *
+   * @param tableName Name of the {@link TransientTable} associated to the
+   *     {@link RepeatUnion}
+   * @param all Whether duplicates are considered
+   * @param maxRep Maximum number of iterations; -1 means no limit
    */
   @Experimental
   public RelBuilder repeatUnion(String tableName, boolean all, int maxRep) {
diff --git a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableRepeatUnionTest.java b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableRepeatUnionTest.java
index d1fd700..d620f07 100644
--- a/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableRepeatUnionTest.java
+++ b/core/src/test/java/org/apache/calcite/test/enumerable/EnumerableRepeatUnionTest.java
@@ -25,8 +25,9 @@ import org.junit.Test;
 import java.util.Arrays;
 
 /**
- * Unit tests for
- * {@link EnumerableRepeatUnion}
+ * Unit tests for {@link EnumerableRepeatUnion}.
+ *
+ * <p>Added in
  * <a href="https://issues.apache.org/jira/browse/CALCITE-2812">[CALCITE-2812]
  * Add algebraic operators to allow expressing recursive queries</a>.
  */
@@ -46,8 +47,7 @@ public class EnumerableRepeatUnionTest {
                 .values(new String[] { "i" }, 1)
                 .transientScan("DELTA")
                 .filter(
-                    builder.call(
-                        SqlStdOperatorTable.LESS_THAN,
+                    builder.call(SqlStdOperatorTable.LESS_THAN,
                         builder.field(0),
                         builder.literal(10)))
                 .project(
@@ -55,8 +55,7 @@ public class EnumerableRepeatUnionTest {
                         builder.field(0),
                         builder.literal(1)))
                 .repeatUnion("DELTA", true)
-                .build()
-        )
+                .build())
         .returnsOrdered("i=1", "i=2", "i=3", "i=4", "i=5", "i=6", "i=7", "i=8", "i=9", "i=10");
   }
 
@@ -74,8 +73,7 @@ public class EnumerableRepeatUnionTest {
                 .values(new String[] { "n", "fact" }, 0, 1)
                 .transientScan("D")
                 .filter(
-                    builder.call(
-                        SqlStdOperatorTable.LESS_THAN,
+                    builder.call(SqlStdOperatorTable.LESS_THAN,
                         builder.field("n"),
                         builder.literal(7)))
                 .project(
@@ -90,8 +88,7 @@ public class EnumerableRepeatUnionTest {
                             builder.field("fact"))),
                     Arrays.asList("n", "fact"))
                 .repeatUnion("D", true)
-                .build()
-        )
+                .build())
         .returnsOrdered("n=0; fact=1",
             "n=1; fact=1",
             "n=2; fact=2",
@@ -121,31 +118,26 @@ public class EnumerableRepeatUnionTest {
                 .values(new String[] { "n" }, 1)
                 .transientScan("T_IN")
                 .filter(
-                    builder.call(
-                        SqlStdOperatorTable.LESS_THAN,
+                    builder.call(SqlStdOperatorTable.LESS_THAN,
                         builder.field("n"),
                         builder.literal(9)))
                 .project(
-                    builder.call(
-                        SqlStdOperatorTable.PLUS,
+                    builder.call(SqlStdOperatorTable.PLUS,
                         builder.field("n"),
                         builder.literal(1)))
                 .repeatUnion("T_IN", true)
 
                 .transientScan("T_OUT")
                 .filter(
-                    builder.call(
-                        SqlStdOperatorTable.LESS_THAN,
+                    builder.call(SqlStdOperatorTable.LESS_THAN,
                         builder.field("n"),
                         builder.literal(100)))
                 .project(
-                    builder.call(
-                        SqlStdOperatorTable.MULTIPLY,
+                    builder.call(SqlStdOperatorTable.MULTIPLY,
                         builder.field("n"),
                         builder.literal(10)))
                 .repeatUnion("T_OUT", true)
-                .build()
-        )
+                .build())
         .returnsOrdered(
             "n=1",   "n=2",   "n=3",   "n=4",   "n=5",   "n=6",   "n=7",   "n=8",   "n=9",
             "n=10",  "n=20",  "n=30",  "n=40",  "n=50",  "n=60",  "n=70",  "n=80",  "n=90",
diff --git a/site/_docs/history.md b/site/_docs/history.md
index a5d575e..616d881 100644
--- a/site/_docs/history.md
+++ b/site/_docs/history.md
@@ -45,10 +45,10 @@ other software versions as specified in `pom.xml`.
 * `Correlate` use `JoinRelType` instead of `SemiJoinType`
 * Rename `EnumerableThetaJoin` to `EnumerableNestedLoopJoin`
 * Rename `EnumerableJoin` to `EnumerableHashJoin`
-* Remove `SemiJoinFactory` from `RelBuilder`, method `semiJoin` now returns a `LogicalJoin` 
-with join type `JoinRelType.SEMI` instead of a `SemiJoin`
+* Remove `SemiJoinFactory` from `RelBuilder`, method `semiJoin` now returns a `LogicalJoin`
+  with join type `JoinRelType.SEMI` instead of a `SemiJoin`
 * Rules: `SemiJoinFilterTransposeRule`, `SemiJoinJoinTransposeRule`, `SemiJoinProjectTransposeRule`
-and `SemiJoinRemoveRule` match `LogicalJoin` with join type `SEMI` instead of `SemiJoin`.  
+  and `SemiJoinRemoveRule` match `LogicalJoin` with join type `SEMI` instead of `SemiJoin`.
 
 ## <a href="https://github.com/apache/calcite/releases/tag/calcite-1.19.0">1.19.0</a> / 2019-03-25
 {: #v1-19-0}
diff --git a/site/_docs/reference.md b/site/_docs/reference.md
index 5def065..b8dfd6d 100644
--- a/site/_docs/reference.md
+++ b/site/_docs/reference.md
@@ -1482,8 +1482,8 @@ period:
 | {fn SUBSTRING(string, offset, length)} | Returns a character string that consists of *length* characters from *string* starting at the *offset* position
 | {fn UCASE(string)} | Returns a string in which all alphabetic characters in *string* have been converted to upper case
 | {fn REPLACE(string, search, replacement)} | Returns a string in which all the occurrences of *search* in *string* are replaced with *replacement*; if *replacement* is the empty string, the occurrences of *search* are removed
-| {fn ASCII(string)} | Returns the corresponding ASCII code of the first character of *string*; Returns 0 if *string* is empty; Returns NULL if *string* is NULL; Returns the Unicode code point for non-ASCII character
-| {fn REVERSE(string)} | Returns the *string* with the order of the characters reversed.
+| {fn ASCII(string)} | Returns the ASCII code of the first character of *string*; if the first character is a non-ASCII character, returns its Unicode code point; returns 0 if *string* is empty
+| {fn REVERSE(string)} | Returns *string* with the order of the characters reversed
 
 Not implemented:
 
@@ -2099,7 +2099,7 @@ semantics.
 | m | JSON_KEYS(jsonValue [, path ])                 | Returns a string indicating the keys of a JSON *jsonValue*
 | m | JSON_REMOVE(jsonValue, path[, path])           | Removes data from *jsonValue* using a series of *path* expressions and returns the result
 | m | JSON_STORAGE_SIZE(jsonValue)                   | Returns the number of bytes used to store the binary representation of a *jsonValue*
-| m | REVERSE(string)                                | Returns the reverse order of *string*
+| m | REVERSE(string)                                | Returns *string* with the order of the characters reversed
 | o | DECODE(value, value1, result1 [, valueN, resultN ]* [, default ]) | Compares *value* to each *valueN* value one by one; if *value* is equal to a *valueN*, returns the corresponding *resultN*, else returns *default*, or NULL if *default* is not specified
 | o | NVL(value1, value2)                            | Returns *value1* if *value1* is not null, otherwise *value2*
 | o | LTRIM(string)                                  | Returns *string* with all blanks removed from the start
@@ -2108,10 +2108,10 @@ semantics.
 | o | GREATEST(expr [, expr ]*)                      | Returns the greatest of the expressions
 | o | LEAST(expr [, expr ]* )                        | Returns the least of the expressions
 | o p | TRANSLATE(expr, fromString, toString)        | Returns *expr* with all occurrences of each character in *fromString* replaced by its corresponding character in *toString*. Characters in *expr* that are not in *fromString* are not replaced
-| m o p | SOUNDEX(string)                            | Returns the phonetic representation of *string*. Throws exception when *string* is encoded with multi-byte encoding such as UTF-8
-| p | DIFFERENCE(string, string)                     | Returns the difference between the SOUNDEX values of two character expressions as an integer. For example, returns 4 if the SOUNDEX values are same and returns 0 if the SOUNDEX values are totally different.
-| m p | REPEAT(string, integer)                      | Returns a string of *integer* times *string*; Returns an empty string if *integer* is less than 1
-| m | SPACE(integer)                                 | Returns a string of *integer* spaces; Returns an empty string if *integer* is less than 1
+| m o p | SOUNDEX(string)                            | Returns the phonetic representation of *string*; throws if *string* is encoded with multi-byte encoding such as UTF-8
+| p | DIFFERENCE(string, string)                     | Returns a measure of the similarity of two strings, namely the number of character positions that their `SOUNDEX` values have in common: 4 if the `SOUNDEX` values are same and 0 if the `SOUNDEX` values are totally different
+| m p | REPEAT(string, integer)                      | Returns a string consisting of *string* repeated of *integer* times; returns an empty string if *integer* is less than 1
+| m | SPACE(integer)                                 | Returns a string of *integer* spaces; returns an empty string if *integer* is less than 1
 
 Note:
 


[calcite] 02/03: [CALCITE-3106] Upgrade commons-pool2 from 2.6.0 to 2.6.2 (Fokko Driesprong)

Posted by jh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jhyde pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/calcite.git

commit 674c12384234f6b2454b1166c8a440f935324118
Author: Fokko Driesprong <fo...@apache.org>
AuthorDate: Fri May 31 20:23:42 2019 +0200

    [CALCITE-3106] Upgrade commons-pool2 from 2.6.0 to 2.6.2 (Fokko Driesprong)
    
    Close apache/calcite#1248
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 3e85f1b..678c9c9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -75,7 +75,7 @@ limitations under the License.
     <commons-codec.version>1.12</commons-codec.version>
     <commons-dbcp2.version>2.5.0</commons-dbcp2.version>
     <commons-lang3.version>3.8</commons-lang3.version>
-    <commons-pool2.version>2.6.0</commons-pool2.version>
+    <commons-pool2.version>2.6.2</commons-pool2.version>
     <elasticsearch.version>7.0.1</elasticsearch.version>
     <esri-geometry-api.version>2.2.0</esri-geometry-api.version>
     <findbugs.version>3.0.1</findbugs.version>