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 2017/06/19 00:28:53 UTC

[2/4] calcite git commit: Cosmetic changes

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/core/src/test/java/org/apache/calcite/util/TestUtil.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/util/TestUtil.java b/core/src/test/java/org/apache/calcite/util/TestUtil.java
index b8da09a..5a283d2 100644
--- a/core/src/test/java/org/apache/calcite/util/TestUtil.java
+++ b/core/src/test/java/org/apache/calcite/util/TestUtil.java
@@ -72,10 +72,10 @@ public abstract class TestUtil {
    * <pre><code>string with "quotes" split
    * across lines</code></pre>
    *
-   * becomes
+   * <p>becomes
    *
-   * <pre><code>"string with \"quotes\" split" + NL +
-   *  "across lines"</code></pre>
+   * <blockquote><pre><code>"string with \"quotes\" split" + NL +
+   *  "across lines"</code></pre></blockquote>
    */
   public static String quoteForJava(String s) {
     s = Util.replace(s, "\\", "\\\\");
@@ -96,14 +96,14 @@ public abstract class TestUtil {
    *
    * <p>For example,</p>
    *
-   * <pre><code>string with "quotes" split
-   * across lines</code></pre>
+   * <blockquote><pre><code>string with "quotes" split
+   * across lines</code></pre></blockquote>
    *
    * <p>becomes</p>
    *
-   * <pre><code>TestUtil.fold(
+   * <blockquote><pre><code>TestUtil.fold(
    *  "string with \"quotes\" split\n",
-   *  + "across lines")</code></pre>
+   *  + "across lines")</code></pre></blockquote>
    */
   public static String toJavaString(String s) {
     // Convert [string with "quotes" split

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java
----------------------------------------------------------------------
diff --git a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java
index c5a97ce..a0418db 100644
--- a/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java
+++ b/druid/src/main/java/org/apache/calcite/adapter/druid/DruidRules.java
@@ -598,7 +598,7 @@ public class DruidRules {
           if (idx >= topAgg.getGroupCount()) {
             continue;
           }
-          //has the indexes of the columns used for sorts
+          // has the indexes of the columns used for sorts
           positionsReferenced.set(topAgg.getGroupSet().nth(idx));
         }
         // Case it is a timeseries query

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/elasticsearch/src/test/java/org/apache/calcite/test/ElasticsearchAdapterIT.java
----------------------------------------------------------------------
diff --git a/elasticsearch/src/test/java/org/apache/calcite/test/ElasticsearchAdapterIT.java b/elasticsearch/src/test/java/org/apache/calcite/test/ElasticsearchAdapterIT.java
index d99351e..da4192f 100644
--- a/elasticsearch/src/test/java/org/apache/calcite/test/ElasticsearchAdapterIT.java
+++ b/elasticsearch/src/test/java/org/apache/calcite/test/ElasticsearchAdapterIT.java
@@ -37,7 +37,7 @@ import javax.annotation.Nullable;
  * mvn install
  * </code></blockquote>
  *
- * This will create a virtual machine with Elasticsearch and the "zips" test
+ * <p>This will create a virtual machine with Elasticsearch and the "zips" test
  * dataset.
  */
 public class ElasticsearchAdapterIT {

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvEnumerator.java
----------------------------------------------------------------------
diff --git a/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvEnumerator.java b/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvEnumerator.java
index 327464b..b6dd314 100644
--- a/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvEnumerator.java
+++ b/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvEnumerator.java
@@ -325,7 +325,7 @@ class CsvEnumerator<E> implements Enumerator<E> {
   static class ArrayRowConverter extends RowConverter<Object[]> {
     private final CsvFieldType[] fieldTypes;
     private final int[] fields;
-    //whether the row to convert is from a stream
+    // whether the row to convert is from a stream
     private final boolean stream;
 
     ArrayRowConverter(List<CsvFieldType> fieldTypes, int[] fields) {

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/example/csv/src/test/resources/sales/DEPTS.csv
----------------------------------------------------------------------
diff --git a/example/csv/src/test/resources/sales/DEPTS.csv b/example/csv/src/test/resources/sales/DEPTS.csv
index b240228..628f2d8 100644
--- a/example/csv/src/test/resources/sales/DEPTS.csv
+++ b/example/csv/src/test/resources/sales/DEPTS.csv
@@ -1,4 +1,4 @@
 DEPTNO:int,NAME:string
 10,"Sales"
 20,"Marketing"
-30,"Accounts"
\ No newline at end of file
+30,"Accounts"

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/file/src/test/resources/sales-csv/DEPTS.csv
----------------------------------------------------------------------
diff --git a/file/src/test/resources/sales-csv/DEPTS.csv b/file/src/test/resources/sales-csv/DEPTS.csv
index b240228..628f2d8 100644
--- a/file/src/test/resources/sales-csv/DEPTS.csv
+++ b/file/src/test/resources/sales-csv/DEPTS.csv
@@ -1,4 +1,4 @@
 DEPTNO:int,NAME:string
 10,"Sales"
 20,"Marketing"
-30,"Accounts"
\ No newline at end of file
+30,"Accounts"

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/linq4j/src/main/java/org/apache/calcite/linq4j/Linq4j.java
----------------------------------------------------------------------
diff --git a/linq4j/src/main/java/org/apache/calcite/linq4j/Linq4j.java b/linq4j/src/main/java/org/apache/calcite/linq4j/Linq4j.java
index 3dde65c..d6c727c 100644
--- a/linq4j/src/main/java/org/apache/calcite/linq4j/Linq4j.java
+++ b/linq4j/src/main/java/org/apache/calcite/linq4j/Linq4j.java
@@ -234,7 +234,7 @@ public abstract class Linq4j {
    *
    * <blockquote><code>Linq4j.cast(list, Integer.class)</code></blockquote>
    *
-   * to convert the list of an enumerable that can be queried using the
+   * <p>to convert the list of an enumerable that can be queried using the
    * standard query operators.
    *
    * <p>If an element cannot be cast to type &lt;TResult&gt;, this method will
@@ -275,7 +275,7 @@ public abstract class Linq4j {
    *
    * <blockquote><code>Linq4j.ofType(list, Integer.class)</code></blockquote>
    *
-   * to convert the list of an enumerable that can be queried using the
+   * <p>to convert the list of an enumerable that can be queried using the
    * standard query operators.
    *
    * @see Enumerable#cast(Class)

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/linq4j/src/main/java/org/apache/calcite/linq4j/function/Deterministic.java
----------------------------------------------------------------------
diff --git a/linq4j/src/main/java/org/apache/calcite/linq4j/function/Deterministic.java b/linq4j/src/main/java/org/apache/calcite/linq4j/function/Deterministic.java
index 469c493..598ef01 100644
--- a/linq4j/src/main/java/org/apache/calcite/linq4j/function/Deterministic.java
+++ b/linq4j/src/main/java/org/apache/calcite/linq4j/function/Deterministic.java
@@ -25,7 +25,7 @@ import java.lang.annotation.Target;
  * Specifies that function is deterministic (i.e. returns the same output
  * given the same inputs).
  *
- * Deterministic functions can be factored out by optimizer to static fields.
+ * <p>Deterministic functions can be factored out by optimizer to static fields.
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE })

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/linq4j/src/main/java/org/apache/calcite/linq4j/tree/ConstantUntypedNull.java
----------------------------------------------------------------------
diff --git a/linq4j/src/main/java/org/apache/calcite/linq4j/tree/ConstantUntypedNull.java b/linq4j/src/main/java/org/apache/calcite/linq4j/tree/ConstantUntypedNull.java
index 7fa36fe..1a12444 100644
--- a/linq4j/src/main/java/org/apache/calcite/linq4j/tree/ConstantUntypedNull.java
+++ b/linq4j/src/main/java/org/apache/calcite/linq4j/tree/ConstantUntypedNull.java
@@ -21,9 +21,9 @@ package org.apache.calcite.linq4j.tree;
  * Java allows type inference for such nulls, thus "null" cannot always be
  * replaced to (Object)null and vise versa.
  *
- * ConstantExpression(null, Object.class) is not equal to ConstantUntypedNull
- * However, optimizers might treat all the nulls equal (e.g. in case of
- * comparison).
+ * <p>{@code ConstantExpression(null, Object.class)} is not equal to
+ * {@code ConstantUntypedNull} However, optimizers might treat all the nulls
+ * equal (e.g. in case of comparison).
  */
 public class ConstantUntypedNull extends ConstantExpression {
   public static final ConstantExpression INSTANCE = new ConstantUntypedNull();

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/linq4j/src/main/java/org/apache/calcite/linq4j/tree/OptimizeShuttle.java
----------------------------------------------------------------------
diff --git a/linq4j/src/main/java/org/apache/calcite/linq4j/tree/OptimizeShuttle.java b/linq4j/src/main/java/org/apache/calcite/linq4j/tree/OptimizeShuttle.java
index fa90a4c..676393b 100644
--- a/linq4j/src/main/java/org/apache/calcite/linq4j/tree/OptimizeShuttle.java
+++ b/linq4j/src/main/java/org/apache/calcite/linq4j/tree/OptimizeShuttle.java
@@ -342,7 +342,7 @@ public class OptimizeShuttle extends Shuttle {
       }
     }
     // We might have dangling "else", however if we have just single item
-    // it means we have if (false) else if(false) else if (true) {...} code.
+    // it means we have if (false) else if (false) else if (true) {...} code.
     // Then we just return statement from true branch
     if (list.size() == 1) {
       return (Statement) list.get(0);

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/pig/src/main/java/org/apache/calcite/adapter/pig/PigAggregate.java
----------------------------------------------------------------------
diff --git a/pig/src/main/java/org/apache/calcite/adapter/pig/PigAggregate.java b/pig/src/main/java/org/apache/calcite/adapter/pig/PigAggregate.java
index 1f83306..6ccbfac 100644
--- a/pig/src/main/java/org/apache/calcite/adapter/pig/PigAggregate.java
+++ b/pig/src/main/java/org/apache/calcite/adapter/pig/PigAggregate.java
@@ -45,7 +45,6 @@ public class PigAggregate extends Aggregate implements PigRel {
       ImmutableBitSet groupSet, List<ImmutableBitSet> groupSets, List<AggregateCall> aggCalls) {
     super(cluster, traits, child, indicator, groupSet, groupSets, aggCalls);
     assert getConvention() == PigRel.CONVENTION;
-    //assert getConvention() == child.getConvention();
   }
 
   @Override public Aggregate copy(RelTraitSet traitSet, RelNode input, boolean indicator,

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/piglet/src/main/java/org/apache/calcite/piglet/Ast.java
----------------------------------------------------------------------
diff --git a/piglet/src/main/java/org/apache/calcite/piglet/Ast.java b/piglet/src/main/java/org/apache/calcite/piglet/Ast.java
index 78d0c13..f0213f2 100644
--- a/piglet/src/main/java/org/apache/calcite/piglet/Ast.java
+++ b/piglet/src/main/java/org/apache/calcite/piglet/Ast.java
@@ -219,12 +219,13 @@ public class Ast {
   /** Parse tree node for FOREACH statement (nested).
    *
    * <p>Syntax:
+   *
    * <blockquote><code>
    * alias = FOREACH nested_alias {
    *   alias = nested_op; [alias = nested_op; ]...
    *   GENERATE expression [, expression]...
    * };<br>
-   *
+   * &nbsp;
    * nested_op ::= DISTINCT, FILTER, LIMIT, ORDER, SAMPLE
    * </code>
    * </blockquote>

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/site/_docs/materialized_views.md
----------------------------------------------------------------------
diff --git a/site/_docs/materialized_views.md b/site/_docs/materialized_views.md
index c950c2a..8cb57cd 100644
--- a/site/_docs/materialized_views.md
+++ b/site/_docs/materialized_views.md
@@ -116,7 +116,7 @@ JOIN (
 ON (depts.deptno = subq.deptno)
 ```
 
-* Materialized view definition:  
+* Materialized view definition:
 
 ```SQL
 SELECT empid
@@ -124,7 +124,7 @@ FROM emps
 JOIN depts USING (deptno)
 ```
 
-* Rewriting:  
+* Rewriting:
 
 ```SQL
 SELECT empid
@@ -144,7 +144,7 @@ WHERE deptno > 10
 GROUP BY deptno
 ```
 
-* Materialized view definition:  
+* Materialized view definition:
 
 ```SQL
 SELECT empid, deptno
@@ -153,7 +153,7 @@ WHERE deptno > 5
 GROUP BY empid, deptno
 ```
 
-* Rewriting:  
+* Rewriting:
 
 ```SQL
 SELECT deptno
@@ -173,7 +173,7 @@ FROM emps
 GROUP BY deptno
 ```
 
-* Materialized view definition:  
+* Materialized view definition:
 
 ```SQL
 SELECT empid, deptno, COUNT(*) AS c, SUM(salary) AS s
@@ -181,7 +181,7 @@ FROM emps
 GROUP BY empid, deptno
 ```
 
-* Rewriting:  
+* Rewriting:
 
 ```SQL
 SELECT deptno, SUM(c), SUM(s)
@@ -202,7 +202,7 @@ FROM emps
 GROUP BY deptno
 ```
 
-* Materialized view definition:  
+* Materialized view definition:
 
 ```SQL
 SELECT empid, depts.deptno, COUNT(*) AS c, SUM(salary) AS s
@@ -211,7 +211,7 @@ JOIN depts USING (deptno)
 GROUP BY empid, depts.deptno
 ```
 
-* Rewriting:  
+* Rewriting:
 
 ```SQL
 SELECT deptno, SUM(c)
@@ -232,7 +232,7 @@ JOIN locations ON (emps.locationid = locations.locationid)
 GROUP BY deptname, state
 ```
 
-* Materialized view definition:  
+* Materialized view definition:
 
 ```SQL
 SELECT empid, deptno, state, SUM(salary) AS s
@@ -241,7 +241,7 @@ JOIN locations ON (emps.locationid = locations.locationid)
 GROUP BY empid, deptno, state
 ```
 
-* Rewriting:  
+* Rewriting:
 
 ```SQL
 SELECT deptname, state, SUM(s)
@@ -262,7 +262,7 @@ JOIN depts ON (emps.deptno = depts.deptno)
 WHERE salary > 10000
 ```
 
-* Materialized view definition:  
+* Materialized view definition:
 
 ```SQL
 SELECT empid, deptname
@@ -271,7 +271,7 @@ JOIN depts ON (emps.deptno = depts.deptno)
 WHERE salary > 12000
 ```
 
-* Rewriting:  
+* Rewriting:
 
 ```SQL
 SELECT empid, deptname
@@ -333,4 +333,4 @@ This rule still presents some limitations. In particular, the rewriting rule att
 <li>[<a name="ref-gl01">GL01</a>] Jonathan Goldstein and Per-åke Larson.
     <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.95.113">Optimizing queries using materialized views: A practical, scalable solution</a>.
     In <i>Proc. ACM SIGMOD Conf.</i>, 2001.</li>
-</ul>
\ No newline at end of file
+</ul>

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/site/_posts/2015-11-10-release-1.5.0.md
----------------------------------------------------------------------
diff --git a/site/_posts/2015-11-10-release-1.5.0.md b/site/_posts/2015-11-10-release-1.5.0.md
index e4bb8d1..4072e91 100644
--- a/site/_posts/2015-11-10-release-1.5.0.md
+++ b/site/_posts/2015-11-10-release-1.5.0.md
@@ -30,4 +30,4 @@ This is our first release as a top-level Apache project! Thanks to everyone who
 
 In addition to a large number of bug fixes and minor enhancements, this release includes major improvements to Avatica, planner rules, and RelBuilder.
 
-Further, we built Piglet, a subset of the classic Hadoop language Pig. Pig is particularly interesting because it makes heavy use of nested multi-sets. You can follow this example to implement your own query language, and immediately taking advantage of Calcite's back-ends and optimizer rules.
\ No newline at end of file
+Further, we built Piglet, a subset of the classic Hadoop language Pig. Pig is particularly interesting because it makes heavy use of nested multi-sets. You can follow this example to implement your own query language, and immediately taking advantage of Calcite's back-ends and optimizer rules.

http://git-wip-us.apache.org/repos/asf/calcite/blob/1855861a/sqlline
----------------------------------------------------------------------
diff --git a/sqlline b/sqlline
index 4d70f8b..6e4b4e9 100755
--- a/sqlline
+++ b/sqlline
@@ -31,7 +31,7 @@ esac
 cd $(dirname $0)
 if [ ! -f target/fullclasspath.txt ]; then
     mvn dependency:build-classpath -Dmdep.outputFile=target/classpath.txt
-    awk -v RS=: -v ORS=: '{if(!m[$0]) {m[$0]=1; print}}' \
+    awk -v RS=: -v ORS=: '{if (!m[$0]) {m[$0]=1; print}}' \
         target/classpath.txt \
         */target/classpath.txt > target/fullclasspath.txt
 fi