Fix javadoc

Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/7cec056a
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/7cec056a
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/7cec056a

Branch: refs/heads/master
Commit: 7cec056a0fc3c4c93d6e3b7de0a687ad213c0825
Parents: e9d0ca6
Author: Julian Hyde <[email protected]>
Authored: Wed Apr 26 13:43:53 2017 -0700
Committer: Julian Hyde <[email protected]>
Committed: Wed Apr 26 14:21:11 2017 -0700

----------------------------------------------------------------------
 .../org/apache/calcite/plan/RelOptUtil.java     |  2 +-
 .../calcite/rel/metadata/BuiltInMetadata.java   | 10 +++---
 .../rel/metadata/RelMdAllPredicates.java        |  6 ++--
 .../rel/metadata/RelMdExpressionLineage.java    | 34 +++++++++++---------
 .../calcite/rel/metadata/RelMdNodeTypes.java    |  2 +-
 .../rel/metadata/RelMdTableReferences.java      | 21 ++++++------
 .../calcite/rel/metadata/RelMetadataQuery.java  |  2 +-
 .../rel/rules/AbstractMaterializedViewRule.java |  9 +++---
 .../apache/calcite/rex/RexTableInputRef.java    |  6 ++--
 .../java/org/apache/calcite/rex/RexUtil.java    | 20 ++++++------
 .../calcite/sql/parser/SqlParserTest.java       |  2 +-
 .../calcite/test/MaterializationTest.java       | 12 ++++---
 site/_docs/materialized_views.md                |  9 +++---
 13 files changed, 72 insertions(+), 63 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java 
b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
index b449417..e91dac5 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
@@ -845,7 +845,7 @@ public abstract class RelOptUtil {
    * <blockquote><code>L.A = R.X AND L.B = L.C AND (L.D = 5 OR L.E =
    * R.Y)</code></blockquote>
    *
-   * returns
+   * <p>returns
    *
    * <ul>
    * <li>leftKeys = {A}

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rel/metadata/BuiltInMetadata.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/calcite/rel/metadata/BuiltInMetadata.java 
b/core/src/main/java/org/apache/calcite/rel/metadata/BuiltInMetadata.java
index 863e3e8..6d09cc7 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/BuiltInMetadata.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/BuiltInMetadata.java
@@ -183,7 +183,8 @@ public abstract class BuiltInMetadata {
 
     /** Handler API. */
     interface Handler extends MetadataHandler<NodeTypes> {
-      Multimap<Class<? extends RelNode>, RelNode> getNodeTypes(RelNode r, 
RelMetadataQuery mq);
+      Multimap<Class<? extends RelNode>, RelNode> getNodeTypes(RelNode r,
+          RelMetadataQuery mq);
     }
   }
 
@@ -420,9 +421,10 @@ public abstract class BuiltInMetadata {
      * same table, the qualified name + occurrence will be the same.
      *
      * @param expression expression whose lineage we want to resolve
+     *
      * @return set of expressions with lineage resolved, or null if this 
information
      * cannot be determined (e.g. origin of an expression is an aggregation
-     * in an {@link Aggregate} operator)
+     * in an {@link org.apache.calcite.rel.core.Aggregate} operator)
      */
     Set<RexNode> getExpressionLineage(RexNode expression);
 
@@ -559,8 +561,8 @@ public abstract class BuiltInMetadata {
    * <p>The difference with respect to {@link Predicates} provider is that
    * this provider tries to extract ALL predicates even if they are not
    * applied on the output expressions of the relational expression; we rely
-   * on {@link RexTableInputRef} to reference origin columns in {@link 
TableScan}
-   * for the result predicates.
+   * on {@link RexTableInputRef} to reference origin columns in
+   * {@link org.apache.calcite.rel.core.TableScan} for the result predicates.
    */
   public interface AllPredicates extends Metadata {
     MetadataDef<AllPredicates> DEF = MetadataDef.of(AllPredicates.class,

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdAllPredicates.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdAllPredicates.java 
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdAllPredicates.java
index 5f87a05..616c429 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdAllPredicates.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdAllPredicates.java
@@ -48,14 +48,14 @@ import java.util.Set;
  * Utility to extract Predicates that are present in the (sub)plan
  * starting at this node.
  *
- * This should be used to infer whether same filters are applied on
+ * <p>This should be used to infer whether same filters are applied on
  * a given plan by materialized view rewriting rules.
  *
- * The output predicates might contain references to columns produced
+ * <p>The output predicates might contain references to columns produced
  * by TableScan operators ({@link RexTableInputRef}). In turn, each TableScan
  * operator is identified uniquely by its qualified name and an identifier.
  *
- * If the provider cannot infer the lineage for any of the expressions
+ * <p>If the provider cannot infer the lineage for any of the expressions
  * contain in any of the predicates, it will return null. Observe that
  * this is different from the empty list of predicates, which means that
  * there are not predicates in the (sub)plan.

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdExpressionLineage.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdExpressionLineage.java
 
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdExpressionLineage.java
index 87c752d..e7c82fd 100644
--- 
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdExpressionLineage.java
+++ 
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdExpressionLineage.java
@@ -59,16 +59,18 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * RelMdExpressionLineage supplies a default implementation of
- * {@link RelMetadataQuery#getExpressionLineage} for the standard logical 
algebra.
+ * Default implementation of
+ * {@link RelMetadataQuery#getExpressionLineage} for the standard logical
+ * algebra.
  *
- * The goal of this provider is to infer the lineage for the given expression.
+ * <p>The goal of this provider is to infer the lineage for the given 
expression.
  *
- * The output expressions might contain references to columns produced by 
TableScan
- * operators ({@link RexTableInputRef}). In turn, each TableScan operator is 
identified
- * uniquely by a {@link RelTableRef} containing its qualified name and an 
identifier.
+ * <p>The output expressions might contain references to columns produced by
+ * {@link TableScan} operators ({@link RexTableInputRef}). In turn, each
+ * TableScan operator is identified uniquely by a {@link RelTableRef} 
containing
+ * its qualified name and an identifier.
  *
- * If the lineage cannot be inferred, we return null.
+ * <p>If the lineage cannot be inferred, we return null.
  */
 public class RelMdExpressionLineage
     implements MetadataHandler<BuiltInMetadata.ExpressionLineage> {
@@ -104,9 +106,9 @@ public class RelMdExpressionLineage
   }
 
   /**
-   * Expression lineage from TableScan.
+   * Expression lineage from {@link TableScan}.
    *
-   * We extract the fields referenced by the expression and we express them
+   * <p>We extract the fields referenced by the expression and we express them
    * using {@link RexTableInputRef}.
    */
   public Set<RexNode> getExpressionLineage(TableScan rel,
@@ -135,10 +137,10 @@ public class RelMdExpressionLineage
   }
 
   /**
-   * Expression lineage from Aggregate.
+   * Expression lineage from {@link Aggregate}.
    *
-   * If the expression references grouping sets or aggregation function 
results,
-   * we cannot extract the lineage and we return null.
+   * <p>If the expression references grouping sets or aggregate function
+   * results, we cannot extract the lineage and we return null.
    */
   public Set<RexNode> getExpressionLineage(Aggregate rel,
       RelMetadataQuery mq, RexNode outputExpression) {
@@ -177,9 +179,9 @@ public class RelMdExpressionLineage
   }
 
   /**
-   * Expression lineage from Join.
+   * Expression lineage from {@link Join}.
    *
-   * We only extract the lineage for INNER joins.
+   * <p>We only extract the lineage for INNER joins.
    */
   public Set<RexNode> getExpressionLineage(Join rel, RelMetadataQuery mq,
       RexNode outputExpression) {
@@ -253,9 +255,9 @@ public class RelMdExpressionLineage
   }
 
   /**
-   * Expression lineage from Union.
+   * Expression lineage from {@link Union}.
    *
-   * For Union operator, we might be able to extract multiple origins for the
+   * <p>For Union operator, we might be able to extract multiple origins for 
the
    * references in the given expression.
    */
   public Set<RexNode> getExpressionLineage(Union rel, RelMetadataQuery mq,

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdNodeTypes.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdNodeTypes.java 
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdNodeTypes.java
index 566df3a..31e223d 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdNodeTypes.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdNodeTypes.java
@@ -54,7 +54,7 @@ public class RelMdNodeTypes
   }
 
   /** Catch-all implementation for
-   * {@link BuiltInMetadata.NodeTypeCount#getNodeTypes()},
+   * {@link BuiltInMetadata.NodeTypes#getNodeTypes()},
    * invoked using reflection.
    *
    * @see 
org.apache.calcite.rel.metadata.RelMetadataQuery#getNodeTypes(RelNode)

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdTableReferences.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdTableReferences.java 
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdTableReferences.java
index b12b425..d84e911 100644
--- 
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMdTableReferences.java
+++ 
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMdTableReferences.java
@@ -43,17 +43,17 @@ import java.util.Map;
 import java.util.Set;
 
 /**
- * RelMdTableReferences supplies a default implementation of
- * {@link RelMetadataQuery#getTableReferences} for the standard logical 
algebra.
+ * Default implementation of {@link RelMetadataQuery#getTableReferences} for 
the
+ * standard logical algebra.
  *
- * The goal of this provider is to return all tables used by a given expression
- * identified uniquely by a {@link RelTableRef}.
+ * <p>The goal of this provider is to return all tables used by a given
+ * expression identified uniquely by a {@link RelTableRef}.
  *
- * Each unique identifier {@link RelTableRef} of a table will equal to the
- * identifier obtained running {@link RelMdExpressionLineage} over the same
- * plan node for an expression that refers to the same table.
+ * <p>Each unique identifier {@link RelTableRef} of a table will equal to the
+ * identifier obtained running {@link RelMdExpressionLineage} over the same 
plan
+ * node for an expression that refers to the same table.
  *
- * If tables cannot be obtained, we return null.
+ * <p>If tables cannot be obtained, we return null.
  */
 public class RelMdTableReferences
     implements MetadataHandler<BuiltInMetadata.TableReferences> {
@@ -133,9 +133,10 @@ public class RelMdTableReferences
   }
 
   /**
-   * Table references from Union.
+   * Table references from {@link Union}.
    *
-   * For Union operator, we might be able to extract multiple table references.
+   * <p>For Union operator, we might be able to extract multiple table
+   * references.
    */
   public Set<RelTableRef> getTableReferences(Union rel, RelMetadataQuery mq) {
     final Set<RelTableRef> result = new HashSet<>();

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java 
b/core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java
index 7298ba3..ebd9e91 100644
--- a/core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java
+++ b/core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java
@@ -205,7 +205,7 @@ public class RelMetadataQuery {
 
   /**
    * Returns the
-   * {@link BuiltInMetadata.NodeTypeCount#getNodeTypeCount()}
+   * {@link BuiltInMetadata.NodeTypes#getNodeTypes()}
    * statistic.
    *
    * @param rel the relational expression

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rel/rules/AbstractMaterializedViewRule.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/calcite/rel/rules/AbstractMaterializedViewRule.java
 
b/core/src/main/java/org/apache/calcite/rel/rules/AbstractMaterializedViewRule.java
index 576c04c..2893145 100644
--- 
a/core/src/main/java/org/apache/calcite/rel/rules/AbstractMaterializedViewRule.java
+++ 
b/core/src/main/java/org/apache/calcite/rel/rules/AbstractMaterializedViewRule.java
@@ -985,11 +985,12 @@ public abstract class AbstractMaterializedViewRule 
extends RelOptRule {
   /**
    * Classifies each of the predicates in the list into one of these three
    * categories:
+   *
    * <ul>
-   * <li> 1-l) column equality predicates, or </li>
-   * <li> 2-m) range predicates, comprising <, <=, >, >=, and = between a 
reference
-   * and a constant, or </li>
-   * <li> 3-r) residual predicates, all the rest</li>
+   * <li> 1-l) column equality predicates, or
+   * <li> 2-m) range predicates, comprising &lt;, &le;, &gt;, &ge;, and =
+   *      between a reference and a constant, or
+   * <li> 3-r) residual predicates, all the rest
    * </ul>
    *
    * <p>For each category, it creates the conjunction of the predicates. The

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java 
b/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java
index a8d9fe0..83a3411 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexTableInputRef.java
@@ -25,9 +25,9 @@ import java.util.List;
 /**
  * Variable which references a column of a table occurrence in a relational 
plan.
  *
- * <p>This object is used by:
- * - {@link {@link 
org.apache.calcite.rel.metadata.BuiltInMetadata.ExpressionLineage}, and
- * - {@link {@link 
org.apache.calcite.rel.metadata.BuiltInMetadata.AllPredicates}.
+ * <p>This object is used by
+ * {@link org.apache.calcite.rel.metadata.BuiltInMetadata.ExpressionLineage}
+ * and {@link org.apache.calcite.rel.metadata.BuiltInMetadata.AllPredicates}.
  *
  * <p>Given a relational expression, its purpose is to be able to reference 
uniquely
  * the provenance of a given expression. For that, it uses a unique table 
reference

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/main/java/org/apache/calcite/rex/RexUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rex/RexUtil.java 
b/core/src/main/java/org/apache/calcite/rex/RexUtil.java
index 26c1268..8b3c989 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexUtil.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexUtil.java
@@ -1367,14 +1367,14 @@ public class RexUtil {
   }
 
   /**
-   * Returns whether the input is a 'lossless' casts, i.e., a cast from which 
the original
-   * value of the field can be certainly recovered.
+   * Returns whether the input is a 'loss-less' cast, that is, a cast from 
which
+   * the original value of the field can be certainly recovered.
    *
-   * <p>For instance, int -> bigint is true (as you can cast back to int 
without loss of
-   * information), however bigint -> int is false.
+   * <p>For instance, int &rarr; bigint is loss-less (as you can cast back to
+   * int without loss of information), but bigint &rarr; int is not loss-less.
    *
-   * <p>The implementation of this method does not return false positives. 
However, it is
-   * not complete.
+   * <p>The implementation of this method does not return false positives.
+   * However, it is not complete.
    */
   public static boolean isLosslessCast(RexNode node) {
     if (!node.isA(SqlKind.CAST)) {
@@ -1418,7 +1418,7 @@ public class RexUtil {
    *
    * <blockquote>(a AND b) OR c</blockquote>
    *
-   * but can be converted to CNF:
+   * <p>but can be converted to CNF:
    *
    * <blockquote>(a OR c) AND (b OR c)</blockquote>
    *
@@ -1426,7 +1426,7 @@ public class RexUtil {
    *
    * <blockquote>NOT (a OR NOT b)</blockquote>
    *
-   * but can be converted to CNF by applying de Morgan's theorem:
+   * <p>but can be converted to CNF by applying de Morgan's theorem:
    *
    * <blockquote>NOT a AND b</blockquote>
    *
@@ -1468,7 +1468,7 @@ public class RexUtil {
    *
    * <blockquote>(a OR b) AND c</blockquote>
    *
-   * but can be converted to DNF:
+   * <p>but can be converted to DNF:
    *
    * <blockquote>(a AND c) OR (b AND c)</blockquote>
    *
@@ -1476,7 +1476,7 @@ public class RexUtil {
    *
    * <blockquote>NOT (a OR NOT b)</blockquote>
    *
-   * but can be converted to DNF by applying de Morgan's theorem:
+   * <p>but can be converted to DNF by applying de Morgan's theorem:
    *
    * <blockquote>NOT a AND b</blockquote>
    *

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java 
b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
index 40037cf..6fdb98d 100644
--- a/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
+++ b/core/src/test/java/org/apache/calcite/sql/parser/SqlParserTest.java
@@ -6255,7 +6255,7 @@ public class SqlParserTest {
    * </li>
    * </ul>
    *
-   * A substantially identical set of tests exists in SqlValidatorTest, and
+   * <p>A substantially identical set of tests exists in SqlValidatorTest, and
    * any changes here should be synchronized there.
    */
   @Test public void testIntervalLiterals() {

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/core/src/test/java/org/apache/calcite/test/MaterializationTest.java
----------------------------------------------------------------------
diff --git 
a/core/src/test/java/org/apache/calcite/test/MaterializationTest.java 
b/core/src/test/java/org/apache/calcite/test/MaterializationTest.java
index 7e2c89c..49c88f5 100644
--- a/core/src/test/java/org/apache/calcite/test/MaterializationTest.java
+++ b/core/src/test/java/org/apache/calcite/test/MaterializationTest.java
@@ -898,12 +898,14 @@ public class MaterializationTest {
   /** Tests a complicated star-join query on a complicated materialized
    * star-join query. Some of the features:
    *
-   * 1. query joins in different order;
-   * 2. query's join conditions are in where clause;
-   * 3. query does not use all join tables (safe to omit them because they are
+   * <ol>
+   * <li>query joins in different order;
+   * <li>query's join conditions are in where clause;
+   * <li>query does not use all join tables (safe to omit them because they are
    *    many-to-mandatory-one joins);
-   * 4. query is at higher granularity, therefore needs to roll up;
-   * 5. query has a condition on one of the materialization's grouping columns.
+   * <li>query is at higher granularity, therefore needs to roll up;
+   * <li>query has a condition on one of the materialization's grouping 
columns.
+   * </ol>
    */
   @Ignore
   @Test public void testFilterGroupQueryOnStar() {

http://git-wip-us.apache.org/repos/asf/calcite/blob/7cec056a/site/_docs/materialized_views.md
----------------------------------------------------------------------
diff --git a/site/_docs/materialized_views.md b/site/_docs/materialized_views.md
index 2d4c682..b12c057 100644
--- a/site/_docs/materialized_views.md
+++ b/site/_docs/materialized_views.md
@@ -55,11 +55,12 @@ The following example is taken from the documentation of 
{SubstitutionVisitor}:
 
 Note that {result} uses the materialized view table {mv} and a simplified 
condition {b = 4}.
 This can accomplish a large number of rewritings.
-However, this approach is not scalable in the presence of complex views, e.g., 
views containing many join operators, 
-since it relies on the planner rules to create the equivalence between 
expressions.
+However, this approach is not scalable in the presence of complex
+views, e.g., views containing many join operators, since it relies on
+the planner rules to create the equivalence between expressions.
 
-In turn, an alternative rule that attempts to match queries to views defined 
using arbitrary queries 
-has been proposed.
+In turn, an alternative rule that attempts to match queries to views
+defined using arbitrary queries has been proposed.
 
 {AbstractMaterializedViewRule} builds on the ideas presented 
[here](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.95.113).
 The rule can rewrite expressions containing arbitrary chains of Join, Filter, 
and Project operators.

Reply via email to