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 2015/01/23 05:33:10 UTC
[1/4] incubator-calcite git commit: Remove deprecated APIs
Repository: incubator-calcite
Updated Branches:
refs/heads/master 7c3c711f0 -> e866df3cb
Remove deprecated APIs
Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/cb533784
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/cb533784
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/cb533784
Branch: refs/heads/master
Commit: cb533784ef974b361c6423d3f008a03db2e232ff
Parents: 7c3c711
Author: Julian Hyde <jh...@apache.org>
Authored: Thu Jan 22 16:13:01 2015 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Jan 22 16:13:01 2015 -0800
----------------------------------------------------------------------
.../apache/calcite/plan/RelOptRuleOperand.java | 29 ----------
.../org/apache/calcite/plan/RelOptUtil.java | 57 --------------------
.../rel/type/RelDataTypeFactoryImpl.java | 10 ----
.../java/org/apache/calcite/rex/RexLiteral.java | 7 ---
4 files changed, 103 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/cb533784/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java b/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java
index 00c4c83..e95d7df 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptRuleOperand.java
@@ -21,7 +21,6 @@ import org.apache.calcite.util.Util;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
import java.util.List;
@@ -74,34 +73,6 @@ public class RelOptRuleOperand {
*
* @param clazz Class of relational expression to match (must not be null)
* @param trait Trait to match, or null to match any trait
- * @param children Child operands
- *
- * @deprecated Use
- * {@link #RelOptRuleOperand(Class, RelTrait, com.google.common.base.Predicate, RelOptRuleOperandChildren)};
- * will be removed after
- * {@link org.apache.calcite.util.Bug#upgrade(String) 0.9.2}
- */
- protected <R extends RelNode> RelOptRuleOperand(
- Class<? extends R> clazz,
- RelTrait trait,
- RelOptRuleOperandChildren children) {
- this(clazz, trait, Predicates.<R>alwaysTrue(), children);
- }
-
- /**
- * Creates an operand.
- *
- * <p>The {@code childOperands} argument is often populated by calling one
- * of the following methods:
- * {@link RelOptRule#some},
- * {@link RelOptRule#none()},
- * {@link RelOptRule#any},
- * {@link RelOptRule#unordered},
- * See {@link org.apache.calcite.plan.RelOptRuleOperandChildren} for more
- * details.</p>
- *
- * @param clazz Class of relational expression to match (must not be null)
- * @param trait Trait to match, or null to match any trait
* @param predicate Predicate to apply to relational expression
* @param children Child operands
*/
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/cb533784/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 b8c0235..72a57f2 100644
--- a/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
+++ b/core/src/main/java/org/apache/calcite/plan/RelOptUtil.java
@@ -73,7 +73,6 @@ import org.apache.calcite.sql.fun.SqlStdOperatorTable;
import org.apache.calcite.sql.type.MultisetSqlType;
import org.apache.calcite.sql.type.SqlTypeName;
import org.apache.calcite.sql.validate.SqlValidatorUtil;
-import org.apache.calcite.util.Bug;
import org.apache.calcite.util.Holder;
import org.apache.calcite.util.ImmutableBitSet;
import org.apache.calcite.util.Pair;
@@ -2282,62 +2281,6 @@ public abstract class RelOptUtil {
}
/**
- * Splits a join condition.
- *
- * @param left Left input to the join
- * @param right Right input to the join
- * @param condition Join condition
- * @return Array holding the output; neither element is null. Element 0 is
- * the equi-join condition (or TRUE if empty); Element 1 is rest of the
- * condition (or TRUE if empty).
- *
- * @deprecated Will be removed after 0.9.1
- */
- public static RexNode[] splitJoinCondition(
- RelNode left,
- RelNode right,
- RexNode condition) {
- Bug.upgrade("remove after 0.9.1");
- final RexBuilder rexBuilder = left.getCluster().getRexBuilder();
- final List<Integer> leftKeys = new ArrayList<Integer>();
- final List<Integer> rightKeys = new ArrayList<Integer>();
- final RexNode nonEquiCondition =
- splitJoinCondition(
- left,
- right,
- condition,
- leftKeys,
- rightKeys);
- assert nonEquiCondition != null;
- RexNode equiCondition = rexBuilder.makeLiteral(true);
- assert leftKeys.size() == rightKeys.size();
- final int keyCount = leftKeys.size();
- int offset = left.getRowType().getFieldCount();
- for (int i = 0; i < keyCount; i++) {
- int leftKey = leftKeys.get(i);
- int rightKey = rightKeys.get(i);
- RexNode equi =
- rexBuilder.makeCall(
- SqlStdOperatorTable.EQUALS,
- rexBuilder.makeInputRef(left, leftKey),
- rexBuilder.makeInputRef(
- right.getRowType().getFieldList().get(rightKey)
- .getType(),
- rightKey + offset));
- if (i == 0) {
- equiCondition = equi;
- } else {
- equiCondition =
- rexBuilder.makeCall(
- SqlStdOperatorTable.AND,
- equiCondition,
- equi);
- }
- }
- return new RexNode[]{equiCondition, nonEquiCondition};
- }
-
- /**
* Determines if a projection and its input reference identical input
* references.
*
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/cb533784/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java b/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
index 06ec977..e9016b8 100644
--- a/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
+++ b/core/src/main/java/org/apache/calcite/rel/type/RelDataTypeFactoryImpl.java
@@ -22,7 +22,6 @@ import org.apache.calcite.sql.type.JavaToSqlTypeConversionRules;
import org.apache.calcite.sql.type.SqlTypeFamily;
import org.apache.calcite.sql.type.SqlTypeName;
import org.apache.calcite.sql.type.SqlTypeUtil;
-import org.apache.calcite.util.Bug;
import org.apache.calcite.util.Pair;
import org.apache.calcite.util.Util;
@@ -102,15 +101,6 @@ public abstract class RelDataTypeFactoryImpl implements RelDataTypeFactory {
//~ Constructors -----------------------------------------------------------
- /** Creates a type factory with default type system.
- *
- * @deprecated Will be removed after calcite-0.9.1.
- */
- protected RelDataTypeFactoryImpl() {
- this(RelDataTypeSystem.DEFAULT);
- Bug.upgrade("calcite-0.9.1");
- }
-
/** Creates a type factory. */
protected RelDataTypeFactoryImpl(RelDataTypeSystem typeSystem) {
this.typeSystem = Preconditions.checkNotNull(typeSystem);
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/cb533784/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rex/RexLiteral.java b/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
index 09b869e..5e879a1 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexLiteral.java
@@ -25,7 +25,6 @@ import org.apache.calcite.sql.SqlOperator;
import org.apache.calcite.sql.fun.SqlStdOperatorTable;
import org.apache.calcite.sql.parser.SqlParserUtil;
import org.apache.calcite.sql.type.SqlTypeName;
-import org.apache.calcite.util.Bug;
import org.apache.calcite.util.ConversionUtil;
import org.apache.calcite.util.NlsString;
import org.apache.calcite.util.SaffronProperties;
@@ -531,12 +530,6 @@ public class RexLiteral extends RexNode {
}
}
- /** @deprecated Temporary shim while {@link ByteString} moves to a new
- * package; will be removed before {@link Bug#upgrade(String) 1.0}. */
- public byte byteValue() {
- return ((ByteString) value).byteAt(0);
- }
-
public static boolean booleanValue(RexNode node) {
return (Boolean) ((RexLiteral) node).value;
}
[3/4] incubator-calcite git commit: Update history and version number
Posted by jh...@apache.org.
Update history and version number
Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/ac6ab553
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/ac6ab553
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/ac6ab553
Branch: refs/heads/master
Commit: ac6ab5534b6e717fb1c4d100d8fb51cc4d2fdfdd
Parents: b66ff93
Author: Julian Hyde <jh...@apache.org>
Authored: Thu Jan 22 16:45:17 2015 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Jan 22 20:22:52 2015 -0800
----------------------------------------------------------------------
README | 2 +-
README.md | 2 +-
doc/HISTORY.md | 231 +++++++++++++++++++++++++++++++++++++++++++++-------
doc/HOWTO.md | 15 ++--
pom.xml | 2 +
5 files changed, 214 insertions(+), 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ac6ab553/README
----------------------------------------------------------------------
diff --git a/README b/README
index 9188fff..2626fd2 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-Apache Calcite release 0.9.2 (incubating)
+Apache Calcite release 1.0.0 (incubating)
This is a source or binary distribution of Apache Calcite.
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ac6ab553/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index da6ddf0..48d485e 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ with the following Maven coordinates:
<dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
- <version>0.9.2-incubating</version>
+ <version>1.0.0-incubating</version>
</dependency>
```
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ac6ab553/doc/HISTORY.md
----------------------------------------------------------------------
diff --git a/doc/HISTORY.md b/doc/HISTORY.md
index b6867a6..ab7bd0a 100644
--- a/doc/HISTORY.md
+++ b/doc/HISTORY.md
@@ -3,47 +3,220 @@
For a full list of releases, see
<a href="https://github.com/apache/incubator-calcite/releases">github</a>.
-## Work in progress for 1.0.0-incubating
+## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-1.0.0-incubating">1.0.0-incubating</a> / 2015-01-22
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-474">CALCITE-474</a>]
- Clean up rule naming in order to support enabling/disabling rules
-* Document `WITH`, `LATERAL`, `GROUPING SETS`, `CUBE`, `ROLLUP`;
- add descriptions for all built-in functions and operators.
+Calcite's first major release.
+
+Since the previous release we have re-organized the into the `org.apache.calcite`
+namespace. To make migration of your code easier, we have described the
+<a href="https://issues.apache.org/jira/secure/attachment/12681620/mapping.txt">mapping from old to new class names</a>
+as an attachment to
+[<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>].
+
+The release adds SQL support for `GROUPING SETS`, `EXTEND`, `UPSERT` and sequences;
+a remote JDBC driver;
+improvements to the planner engine and built-in planner rules;
+improvements to the algorithms that implement the relational algebra,
+including an interpreter that can evaluate queries without compilation;
+and fixes about 30 bugs.
+
+New features
+* SQL
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-494">CALCITE-494</a>]
+ Support `NEXT`/`CURRENT VALUE FOR` syntax for using sequences
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-492">CALCITE-492</a>]
+ Support `UPSERT` statement in parser
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-493">CALCITE-493</a>]
+ Add `EXTEND` clause, for defining columns and their types at query/DML time
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-497">CALCITE-497</a>]
+ Support optional qualifier for column name references
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-356">CALCITE-356</a>]
+ Allow column references of the form `schema.table.column`
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-462">CALCITE-462</a>]
+ Allow table functions in `LATERAL` expression
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-282">CALCITE-282</a>]
+ Add `{fn QUARTER(date)}` function (Benoy Antony)
+ * Grouping sets
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-370">CALCITE-370</a>]
+ Support `GROUPING SETS`, `CUBE`, `ROLLUP` in SQL and algebra
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-512">CALCITE-512</a>]
+ Add `GROUP_ID`,`GROUPING_ID`, `GROUPING` functions
+* Planner rule improvements
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-92">CALCITE-92</a>]
+ Optimize away `Project` that merely renames fields
+ * Detect and merge duplicate predicates `AND(x, y, x)` to `AND(x, y)` in more
+ circumstances
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-557">CALCITE-557</a>]
+ Speed up planning by never creating `AbstractConverter`
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-545">CALCITE-545</a>]
+ When a projected expression can only have one value, replace with that
+ constant
+ * Grouping sets
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-542">CALCITE-542</a>]
+ Support for `Aggregate` with grouping sets in `RelMdColumnOrigins` (Jesus
+ Camacho Rodriguez)
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-533">CALCITE-533</a>]
+ Support for grouping sets in `FilterAggregateTransposeRule` (Jesus Camacho
+ Rodriguez)
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-532">CALCITE-532</a>]
+ Support for grouping sets in `AggregateFilterTransposeRule` (Jesus Camacho
+ Rodriguez)
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-513">CALCITE-513</a>]
+ Support for grouping sets in `AggregateProjectMergeRule` (Jesus Camacho
+ Rodriguez)
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-510">CALCITE-510</a>]
+ Support for grouping sets in `AggregateExpandDistinctAggregatesRule` (Jesus
+ Camacho Rodriguez)
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-502">CALCITE-502</a>]
+ Support for grouping sets in `AggregateUnionTransposeRule` (Jesus Camacho
+ Rodriguez)
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-503">CALCITE-503</a>]
+ Tests to check rules on `Aggregate` operator without grouping sets (Jesus
+ Camacho Rodriguez)
+* Algorithms
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-451">CALCITE-451</a>]
+ Implement theta join, inner and outer, in enumerable convention
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-489">CALCITE-489</a>]
+ Update `Correlate` mechanics and implement `EnumerableCorrelate` (aka nested
+ loops join)
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-544">CALCITE-544</a>]
+ Implement `Union` in interpreter
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-562">CALCITE-562</a>]
+ Implement inner `Join` in interpreter and improve handling of scalar expressions
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-543">CALCITE-543</a>]
+ Implement `Aggregate` (including `GROUPING SETS`) in interpreter (Jacques
+ Nadeau)
+ * In progress towards
+ [<a href="https://issues.apache.org/jira/browse/CALCITE-558">CALCITE-558</a>]
+ add `BINDABLE` convention (but `ENUMERABLE` is still the default), and add
+ `ArrayBindable` and `Scalar` interfaces
+* Remote driver
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-93">CALCITE-93</a>]
+ Calcite RPC server
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-94">CALCITE-94</a>]
+ Remote JDBC driver
+ * Make `JsonHandler` and `JsonService` thread-safe
+
+API changes
+* The great code re-org
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>]
+ Re-organize package structure
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-419">CALCITE-419</a>]
+ Naming convention for planner rules
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-306">CALCITE-306</a>]
+ Standardize code style for "import package.*;"
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-474">CALCITE-474</a>]
+ Clean up rule naming in order to support enabling/disabling rules
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-460">CALCITE-460</a>]
+ Add `ImmutableBitSet` and replace uses of `BitSet`
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-479">CALCITE-479</a>]
+ Migrate `RelNode.getChildExps` to `RelNode.accept(RexShuttle)`
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-527">CALCITE-527</a>]
+ Drop `rowType` field and constructor/copy argument of `Calc`
+* Add linq4j and example-csv modules
+ * Remove unused packages in linq4j, and fix checkstyle issues in linq4j and csv
+ * Add calcite-linq4j and calcite-example-csv as POM sub-modules
+ * Import 'optiq-csv' project as 'example/csv/', and add Apache headers
+ * Import 'linq4j' project, and add Apache headers
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-478">CALCITE-478</a>]
+ Move CSV tutorial (Siva Narayanan)
* [<a href="https://issues.apache.org/jira/browse/CALCITE-464">CALCITE-464</a>]
Make parser accept configurable max length for SQL identifier
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-465">CALCITE-465</a>]
+ Remove `OneRow` and `Empty` relational expressions; `Values` will suffice
+
+Bug-fixes and internal changes
+* Build improvements
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-541">CALCITE-541</a>]
+ Update maven-source-plugin to 2.4 to get speedup in jdk 1.8
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-537">CALCITE-537</a>]
+ Skip overwrite of `NOTICE`, `DEPENDENCIES`, and `LICENSE` files
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-538">CALCITE-538</a>]
+ Generate `Parser.jj` only at first build
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-539">CALCITE-539</a>]
+ Avoid rewrite of `org-apache-calcite-jdbc.properties`
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-540">CALCITE-540</a>]
+ Create git.properties file only at first build. This saves time in
+ development at a cost of stale `git.properties`
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-536">CALCITE-536</a>]
+ Add `@PackageMarker` to `package-info.java` so maven-compiler skips
+ compilation when the sources are unchanged
+ * [<a href="https://issues.apache.org/jira/browse/CALCITE-535">CALCITE-535</a>]
+ Support skip overwrite in hydromatic-resource
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-561">CALCITE-561</a>]
+ Upgrade parent POM
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-458">CALCITE-458</a>]
+ ArrayIndexOutOfBoundsException when using just a single column in interpreter
+* Fix spurious extra row from `FULL JOIN`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-554">CALCITE-554</a>]
+ Outer join over NULL keys generates wrong result
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-489">CALCITE-489</a>]
+ Teach `CalciteAssert` to respect multiple settings
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-516">CALCITE-516</a>]
+ `GROUP BY` on a `CASE` expression containing `IN` predicate fails (Aman Sinha)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-552">CALCITE-552</a>]
+ Upgrade tpcds (which depends on an old version of guava)
+* Copy identifier when fully-qualifying, so column aliases have the right case
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-548">CALCITE-548</a>]
+ Extend `induce` method to return `CUBE` and `ROLLUP` (Jesus Camacho Rodriguez)
+ * Simplify `Group.induce` by assuming that group sets are sorted
+* Test case for
+ [<a href="https://issues.apache.org/jira/browse/CALCITE-212">CALCITE-212</a>]
+ Join condition with `OR`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-550">CALCITE-550</a>]
+ Case-insensitive matching of sub-query columns fails
+ * Add more unit tests (Jinfeng Ni)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-448">CALCITE-448</a>]
+ `FilterIntoJoinRule` creates filters containing invalid `RexInputRef`
+* When registering a `RelNode`, be tolerant if it is equivalent to a `RelNode`
+ with different traits
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-547">CALCITE-547</a>]
+ Set nullability while inferring return type of `item(any,...)` operator
+* In Travis CI, enable containers, and cache `.m2` directory
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-534">CALCITE-534</a>]
+ Missing implementation of `ResultSetMetaData.getColumnClassName` (Knut
+ Forkalsrud)
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-506">CALCITE-506</a>]
+ Update `EnumerableRelImplementor.stash` so it is suitable for all kinds of
+ classes
+* Merge join algorithm for `Enumerable`s
+* Efficient `Enumerable` over random-access list
+* Add a test that calls all functions with arguments of all types that they
+ claim to accept
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-511">CALCITE-511</a>]
+ `copy` method in `LogicalAggregate` not copying the indicator value properly
+* Add a model that has lattices and works against HSQLDB
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-509">CALCITE-509</a>]
+ `RelMdColumnUniqueness` uses `ImmutableBitSet.Builder` twice, gets
+ `NullPointerException`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-488">CALCITE-488</a>]
+ `Enumerable<Holder>` does not work if where `Holder` is a custom class
+ with a single field; Calcite tries to treat it as `SCALAR` due to premature
+ `JavaRowFormat.optimize`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-352">CALCITE-352</a>]
+ Throw exception if `ResultSet.next()` is called after `close()`
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-403">CALCITE-403</a>]
+ `Enumerable` gives `NullPointerException` with `NOT` on nullable expression
+* [<a href="https://issues.apache.org/jira/browse/CALCITE-469">CALCITE-469</a>]
+ Update example/csv README.md instructions
+* Document `WITH`, `LATERAL`, `GROUPING SETS`, `CUBE`, `ROLLUP`;
+ add descriptions for all built-in functions and operators
* [<a href="https://issues.apache.org/jira/browse/CALCITE-470">CALCITE-470</a>]
Print warning when column type hint is not understood;
- Update EMPS.deptno column Integer → int
-* Add `GROUPING` function
-* Better handling of null values due to `GROUPING SETS`
-* Fix `Linq4j.product`; the cartesian product of 0 attributes is one row of 0 attributes.
+ Update `EMPS.deptno` column Integer → int
+* Fix `Linq4j.product`; the cartesian product of 0 attributes is one row of 0
+ attributes
* Update link optiq-mat-plugin → mat-calcite-plugin
* [<a href="https://issues.apache.org/jira/browse/CALCITE-467">CALCITE-467</a>]
Incorrect namespace in `package-info.java`
-* Add headers, to appease the RAT.
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-465">CALCITE-465</a>]
- Remove `OneRow` and `Empty` relational expressions; `Values` will suffice
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-370">CALCITE-370</a>]
- Support `GROUPING SETS`, `CUBE`, `ROLLUP` in SQL and algebra
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-460">CALCITE-460</a>]
- Add `ImmutableBitSet` and replace uses of `BitSet`
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-306">CALCITE-306</a>]
- Standardize code style for "import package.*;"
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-296">CALCITE-296</a>]
- Re-organize package structure
-* [<a href="https://issues.apache.org/jira/browse/CALCITE-419">CALCITE-419</a>]
- Naming convention for planner rules
+* Add headers, to appease the RAT
* [<a href="https://issues.apache.org/jira/browse/CALCITE-446">CALCITE-446</a>]
CSV adapter should read from directory relative to the model file
* Add examples of scannable and filterable tables, matching
[<a href="https://issues.apache.org/jira/browse/CALCITE-436">CALCITE-436</a>]
- Simpler SPI to query Table.
-* Remove unused packages in linq4j, and fix checkstyle issues in linq4j and csv.
-* Add calcite-linq4j and calcite-example-csv as POM sub-modules.
-* Import 'optiq-csv' project as 'example/csv/', and add Apache headers
-* Import 'linq4j' project, and add Apache headers
-* Fix `JdbcTest.testVersion` now that version is 1.0.
-* Update release HOWTO.
+ Simpler SPI to query Table
+* Fix `JdbcTest.testVersion` now that version is 1.0
+* Update release HOWTO
## <a href="https://github.com/apache/incubator-calcite/releases/tag/calcite-0.9.2-incubating">0.9.2-incubating</a> / 2014-11-05
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ac6ab553/doc/HOWTO.md
----------------------------------------------------------------------
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index 5e53ba2..a8f3563 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -81,7 +81,7 @@ proposed feature or start a discussion on the dev list.
Fork the github repository, and create a branch for your feature.
-Develop your feature and test cases, and make sure that `mvn clean
+Develop your feature and test cases, and make sure that `mvn
install` succeeds. (Run extra tests if your change warrants it.)
Commit your change to your branch, and use a comment that starts with
@@ -334,7 +334,8 @@ git clean -xn
mvn clean
# Do a dry run of the release:prepare step, which sets version numbers.
-mvn -DdryRun=true -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare 2>&1 | tee /tmp/prepare-dry.log
+mvn clean
+mvn -DdryRun=true -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:prepare 2>&1 | tee /tmp/prepare-dry.log
```
Check the artifacts:
@@ -352,9 +353,9 @@ Check the artifacts:
* In the two source distros `.tar.gz` and `.zip` (currently there is
no binary distro), check that all files belong to a directory called
`apache-calcite-X.Y.Z-incubating-src`.
-* That directory must contain files `NOTICE`, `LICENSE`, `README`,
- `README.md`, `git.properties`
- * Check that the version in `README` is correct
+* That directory must contain files `DISCLAIMER, `NOTICE`, `LICENSE`,
+ `README`, `README.md`, `git.properties`
+ * Check that the version in `README` is correct
* Check that `git.properties` is current
* In each .jar (for example
`core/target/calcite-core-X.Y.Z-incubating.jar` and
@@ -369,10 +370,10 @@ Now, remove the `-DdryRun` flag and run the release for real.
```bash
# Prepare sets the version numbers, creates a tag, and pushes it to git.
-mvn -DdryRun=false -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare 2>&1 | tee /tmp/prepare.log
+mvn -DdryRun=false -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:prepare 2>&1 | tee /tmp/prepare.log
# Perform checks out the tagged version, builds, and deploys to the staging repository
-mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:perform 2>&1 | tee /tmp/perform.log
+mvn -DskipTests -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" release:perform 2>&1 | tee /tmp/perform.log
```
Verify the staged artifacts in the Nexus repository:
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/ac6ab553/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b779003..6d19a0b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,6 +48,8 @@ limitations under the License.
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<top.dir>${project.basedir}</top.dir>
+ <version.major>1</version.major>
+ <version.minor>0</version.minor>
</properties>
<issueManagement>
[4/4] incubator-calcite git commit: [maven-release-plugin] prepare
release calcite-1.0.0-incubating
Posted by jh...@apache.org.
[maven-release-plugin] prepare release calcite-1.0.0-incubating
Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/e866df3c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/e866df3c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/e866df3c
Branch: refs/heads/master
Commit: e866df3cb5494b30279540d2a0782af6d099c0ff
Parents: ac6ab55
Author: Julian Hyde <jh...@apache.org>
Authored: Thu Jan 22 20:32:40 2015 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Jan 22 20:32:40 2015 -0800
----------------------------------------------------------------------
avatica-server/pom.xml | 6 +++---
avatica/pom.xml | 6 +++---
core/pom.xml | 4 ++--
example/csv/pom.xml | 4 ++--
example/pom.xml | 4 ++--
linq4j/pom.xml | 4 ++--
mongodb/pom.xml | 4 ++--
plus/pom.xml | 4 ++--
pom.xml | 4 ++--
spark/pom.xml | 4 ++--
splunk/pom.xml | 4 ++--
ubenchmark/pom.xml | 2 +-
12 files changed, 25 insertions(+), 25 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/avatica-server/pom.xml
----------------------------------------------------------------------
diff --git a/avatica-server/pom.xml b/avatica-server/pom.xml
index 3d5eb26..b7b6417 100644
--- a/avatica-server/pom.xml
+++ b/avatica-server/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-avatica-server</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Avatica Server</name>
<description>JDBC server.</description>
@@ -53,7 +53,7 @@ limitations under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <excludes/>
+ <excludes />
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/avatica/pom.xml
----------------------------------------------------------------------
diff --git a/avatica/pom.xml b/avatica/pom.xml
index b06291d..a0bc7e4 100644
--- a/avatica/pom.xml
+++ b/avatica/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-avatica</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Avatica</name>
<description>JDBC driver framework.</description>
@@ -39,7 +39,7 @@ limitations under the License.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <excludes/>
+ <excludes />
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/core/pom.xml
----------------------------------------------------------------------
diff --git a/core/pom.xml b/core/pom.xml
index 4c54bca..ae0ec67 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-core</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Core</name>
<description>Core Calcite APIs and engine.</description>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/example/csv/pom.xml
----------------------------------------------------------------------
diff --git a/example/csv/pom.xml b/example/csv/pom.xml
index ca25f43..11e8ea4 100644
--- a/example/csv/pom.xml
+++ b/example/csv/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-example</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-example-csv</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Example CSV</name>
<description>An example Calcite provider that reads CSV files</description>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/example/pom.xml
----------------------------------------------------------------------
diff --git a/example/pom.xml b/example/pom.xml
index 437b7ca..2e41607 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -20,13 +20,13 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<!-- The basics. -->
<artifactId>calcite-example</artifactId>
<packaging>pom</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Examples</name>
<description>Calcite examples</description>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/linq4j/pom.xml
----------------------------------------------------------------------
diff --git a/linq4j/pom.xml b/linq4j/pom.xml
index 3dd14bc..14c5e81 100644
--- a/linq4j/pom.xml
+++ b/linq4j/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-linq4j</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Linq4j</name>
<description>Calcite APIs for LINQ (Language-Integrated Query) in Java</description>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/mongodb/pom.xml
----------------------------------------------------------------------
diff --git a/mongodb/pom.xml b/mongodb/pom.xml
index 11980cb..bc38b0d 100644
--- a/mongodb/pom.xml
+++ b/mongodb/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-mongodb</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite MongoDB</name>
<description>MongoDB adapter for Calcite</description>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/plus/pom.xml
----------------------------------------------------------------------
diff --git a/plus/pom.xml b/plus/pom.xml
index 05ab053..2c604a5 100644
--- a/plus/pom.xml
+++ b/plus/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-plus</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Plus</name>
<description>Miscellaneous extras for Calcite</description>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 6d19a0b..c98d9f2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@ limitations under the License.
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
<packaging>pom</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<!-- More project information. -->
<name>Calcite</name>
@@ -61,7 +61,7 @@ limitations under the License.
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-calcite.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/incubator-calcite.git</developerConnection>
<url>https://github.com/apache/incubator-calcite</url>
- <tag>HEAD</tag>
+ <tag>calcite-1.0.0-incubating</tag>
</scm>
<modules>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/spark/pom.xml
----------------------------------------------------------------------
diff --git a/spark/pom.xml b/spark/pom.xml
index e8be900..810e4b7 100644
--- a/spark/pom.xml
+++ b/spark/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-spark</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Spark</name>
<properties>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/splunk/pom.xml
----------------------------------------------------------------------
diff --git a/splunk/pom.xml b/splunk/pom.xml
index 7fd7b0d..b643b73 100644
--- a/splunk/pom.xml
+++ b/splunk/pom.xml
@@ -20,12 +20,12 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<artifactId>calcite-splunk</artifactId>
<packaging>jar</packaging>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
<name>Calcite Splunk</name>
<description>Splunk adapter for Calcite; also a JDBC driver for Splunk</description>
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/e866df3c/ubenchmark/pom.xml
----------------------------------------------------------------------
diff --git a/ubenchmark/pom.xml b/ubenchmark/pom.xml
index e0814d7..be445ea 100644
--- a/ubenchmark/pom.xml
+++ b/ubenchmark/pom.xml
@@ -20,7 +20,7 @@ limitations under the License.
<parent>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite</artifactId>
- <version>1.0.0-incubating-SNAPSHOT</version>
+ <version>1.0.0-incubating</version>
</parent>
<properties>
[2/4] incubator-calcite git commit: Fix up some class names and URLs
in HOWTO, MODEL, TUTORIAL
Posted by jh...@apache.org.
Fix up some class names and URLs in HOWTO, MODEL, TUTORIAL
Project: http://git-wip-us.apache.org/repos/asf/incubator-calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/b66ff933
Tree: http://git-wip-us.apache.org/repos/asf/incubator-calcite/tree/b66ff933
Diff: http://git-wip-us.apache.org/repos/asf/incubator-calcite/diff/b66ff933
Branch: refs/heads/master
Commit: b66ff933741c0e66d57ad5316330c8728861327e
Parents: cb53378
Author: Julian Hyde <jh...@apache.org>
Authored: Thu Jan 22 16:16:34 2015 -0800
Committer: Julian Hyde <jh...@apache.org>
Committed: Thu Jan 22 16:16:34 2015 -0800
----------------------------------------------------------------------
doc/HOWTO.md | 111 +++++++++----------
doc/MODEL.md | 6 +-
doc/TUTORIAL.md | 91 +++++++--------
.../apache/calcite/adapter/csv/CsvSchema.java | 30 ++---
4 files changed, 119 insertions(+), 119 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/b66ff933/doc/HOWTO.md
----------------------------------------------------------------------
diff --git a/doc/HOWTO.md b/doc/HOWTO.md
index 499eb3a..5e53ba2 100644
--- a/doc/HOWTO.md
+++ b/doc/HOWTO.md
@@ -13,8 +13,8 @@ Unpack the source distribution `.tar.gz` or `.zip` file,
then build using maven:
```bash
-$ tar xvfz calcite-0.9.2-incubating-source.tar.gz
-$ cd calcite-0.9.2-incubating
+$ tar xvfz calcite-1.0.0-incubating-source.tar.gz
+$ cd calcite-1.0.0-incubating
$ mvn install
```
@@ -45,7 +45,8 @@ The test suite will run by default when you build, unless you specify
`-DskipTests`:
```bash
-$ mvn -DskipTests clean install
+$ mvn clean
+$ mvn -DskipTests install
```
There are other options that control which tests are run, and in what
@@ -123,19 +124,18 @@ framework. Put the following into core/src/test/resources/logging.properties:
```properties
handlers= java.util.logging.ConsoleHandler
.level= INFO
-org.eigenbase.relopt.RelOptPlanner.level=FINER
+org.apache.calcite.plan.RelOptPlanner.level=FINER
java.util.logging.ConsoleHandler.level=ALL
```
-The line org.eigenbase.relopt.RelOptPlanner.level=FINER tells the planner to produce
-fairly verbose outout. You can modify the file to enable other loggers, or to change levels.
-For instance, if you change FINER to FINEST the planner will give you an account of the
+The line `org.apache.calcite.plan.RelOptPlanner.level=FINER` tells the planner to produce
+fairly verbose output. You can modify the file to enable other loggers, or to change levels.
+For instance, if you change `FINER` to `FINEST` the planner will give you an account of the
planning process so detailed that it might fill up your hard drive.
## CSV adapter
-See <a href="https://github.com/julianhyde/optiq-csv/blob/master/TUTORIAL.md">optiq-csv
-tutorial</a>.
+See the <a href="TUTORIAL.md">tutorial</a>.
## MongoDB adapter
@@ -172,8 +172,8 @@ Calcite model:
$ ./sqlline
sqlline> !connect jdbc:calcite:model=mongodb/target/test-classes/mongo-zips-model.json admin admin
Connecting to jdbc:calcite:model=mongodb/target/test-classes/mongo-zips-model.json
-Connected to: Calcite (version 0.9.x)
-Driver: Calcite JDBC Driver (version 0.9.x)
+Connected to: Calcite (version 1.x.x)
+Driver: Calcite JDBC Driver (version 1.x.x)
Autocommit status: true
Transaction isolation: TRANSACTION_REPEATABLE_READ
sqlline> !tables
@@ -210,68 +210,65 @@ queries. It is also necessary if you intend to run the test suite, using
## Implementing an adapter
-New adapters can be created by implementing `OptiqPrepare.Context`:
+New adapters can be created by implementing `CalcitePrepare.Context`:
```java
-import net.hydromatic.optiq.Schema;
-import net.hydromatic.optiq.impl.java.JavaTypeFactory;
-import net.hydromatic.optiq.jdbc.OptiqPrepare;
-public class AdapterContext implements OptiqPrepare.Context {
-
- @Override
- public JavaTypeFactory getTypeFactory() {
- // adapter implementation
- return typeFactory;
- }
-
- @Override
- public Schema getRootSchema() {
- // adapter implementation
- return rootSchema;
- }
-
+import org.apache.calcite.adapter.java.JavaTypeFactory;
+import org.apache.calcite.jdbc.CalcitePrepare;
+import org.apache.calcite.jdbc.CalciteRootSchema;
+
+public class AdapterContext implements CalcitePrepare.Context {
+ @Override
+ public JavaTypeFactory getTypeFactory() {
+ // adapter implementation
+ return typeFactory;
+ }
+
+ @Override
+ public CalciteRootSchema getRootSchema() {
+ // adapter implementation
+ return rootSchema;
+ }
}
```
### Testing adapter in Java
The example below shows how SQL query can be submitted to
-`OptiqPrepare` with a custom context (`AdapterContext` in this
+`CalcitePrepare` with a custom context (`AdapterContext` in this
case). Calcite prepares and implements the query execution, using the
-resources provided by the `Context`. `OptiqPrepare.PrepareResult`
+resources provided by the `Context`. `CalcitePrepare.PrepareResult`
provides access to the underlying enumerable and methods for
enumeration. The enumerable itself can naturally be some adapter
specific implementation.
```java
-import net.hydromatic.optiq.jdbc.OptiqPrepare;
-import net.hydromatic.optiq.prepare.OptiqPrepareImpl;
+import org.apache.calcite.jdbc.CalcitePrepare;
+import org.apache.calcite.prepare.CalcitePrepareImpl;
import org.junit.Test;
public class AdapterContextTest {
-
- @Test
- public void testSelectAllFromTable() {
- AdapterContext ctx = new AdapterContext();
- String sql = "SELECT * FROM TABLENAME";
- Type elementType = Object[].class;
- OptiqPrepare.PrepareResult<Object> prepared = new OptiqPrepareImpl()
- .prepareSql(ctx, sql, null, elementType, -1);
- Object enumerable = prepared.getExecutable();
- // etc.
- }
-
+ @Test
+ public void testSelectAllFromTable() {
+ AdapterContext ctx = new AdapterContext();
+ String sql = "SELECT * FROM TABLENAME";
+ Class elementType = Object[].class;
+ CalcitePrepare.PrepareResult<Object> prepared =
+ new CalcitePrepareImpl().prepareSql(ctx, sql, null, elementType, -1);
+ Object enumerable = prepared.getExecutable();
+ // etc.
+ }
}
```
-## JavaTypeFactory
+### JavaTypeFactory
-When Calcite compares `Type` instances, it requires them to be the same
-object. If there are two distinct `Type` instances that refer to the
+When Calcite compares types (instances of `RelDataType`), it requires them to be the same
+object. If there are two distinct type instances that refer to the
same Java type, Calcite may fail to recognize that they match. It is
recommended to:
-- Use a single instance of `JavaTypeFactory` within the calcite context
-- Store the `Type` instances so that the same object is always returned for the same `Type`.
+* Use a single instance of `JavaTypeFactory` within the calcite context;
+* Store the types so that the same object is always returned for the same type.
## Set up PGP signing keys (for Calcite committers)
@@ -291,12 +288,13 @@ Before you start:
```bash
# set passphrase variable without putting it into shell history
-read GPG_PASSPHRASE
+read -s GPG_PASSPHRASE
# make sure that there are no junk files in the sandbox
-git clean -x
+git clean -xn
+mvn clean
-mvn -Papache-release -Dgpg.passphrase=${GPG_PASSPHRASE} clean install
+mvn -Papache-release -Dgpg.passphrase=${GPG_PASSPHRASE} install
```
When the dry-run has succeeded, change `install` to `deploy`.
@@ -306,7 +304,7 @@ When the dry-run has succeeded, change `install` to `deploy`.
Before you start:
* Set up signing keys as described above.
* Make sure you are using JDK 1.7 (not 1.6 or 1.8).
-* Check that README and README.md have the correct version number.
+* Check that README, README.md and HOWTO.md have the correct version number.
* Make sure build and tests succeed, including with
-Dcalcite.test.db={mysql,hsqldb}, -Dcalcite.test.slow=true,
-Dcalcite.test.mongodb=true, -Dcalcite.test.splunk=true.
@@ -329,10 +327,11 @@ start again from the top.
```bash
# Set passphrase variable without putting it into shell history
-read GPG_PASSPHRASE
+read -s GPG_PASSPHRASE
# Make sure that there are no junk files in the sandbox
git clean -xn
+mvn clean
# Do a dry run of the release:prepare step, which sets version numbers.
mvn -DdryRun=true -DskipTests -DreleaseVersion=X.Y.Z-incubating -DdevelopmentVersion=X.Y.Z+1-incubating-SNAPSHOT -Papache-release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare 2>&1 | tee /tmp/prepare-dry.log
@@ -362,7 +361,7 @@ Check the artifacts:
`mongodb/target/calcite-mongodb-X.Y.Z-incubating-sources.jar`), check
that the `META-INF` directory contains `DEPENDENCIES`, `LICENSE`,
`NOTICE` and `git.properties`
-* In each .jar, check that `net-hydromatic-optiq-jdbc.properties` is
+* In each .jar, check that `org-apache-calcite-jdbc.properties` is
present and does not contain un-substituted `${...}` variables
* Check PGP, per https://httpd.apache.org/dev/verification.html
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/b66ff933/doc/MODEL.md
----------------------------------------------------------------------
diff --git a/doc/MODEL.md b/doc/MODEL.md
index e9febf2..f533e75 100644
--- a/doc/MODEL.md
+++ b/doc/MODEL.md
@@ -108,7 +108,7 @@ Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
{
name: 'mongo',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.mongodb.MongoSchemaFactory',
+ factory: 'org.apache.calcite.adapter.mongodb.MongoSchemaFactory',
operand: {
host: 'localhost',
database: 'test'
@@ -120,7 +120,7 @@ Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
<a href="#schema">Schema</a>.
`factory` (required string) is the name of the factory class for this
-schema. Must implement interface `net.hydromatic.optiq.SchemaFactory`
+schema. Must implement interface `org.apache.calcite.schema.SchemaFactory`
and have a public default constructor.
`operand` (optional map) contains attributes to be passed to the
@@ -238,7 +238,7 @@ Like base class <a href="#table">Table</a>, occurs within `root.schemas.tables`.
`name`, `type`, `columns` inherited from <a href="#table">Table</a>.
`factory` (required string) is the name of the factory class for this
-table. Must implement interface `net.hydromatic.optiq.TableFactory`
+table. Must implement interface `org.apache.calcite.schema.TableFactory`
and have a public default constructor.
`operand` (optional map) contains attributes to be passed to the
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/b66ff933/doc/TUTORIAL.md
----------------------------------------------------------------------
diff --git a/doc/TUTORIAL.md b/doc/TUTORIAL.md
index 4519db3..40a5982 100644
--- a/doc/TUTORIAL.md
+++ b/doc/TUTORIAL.md
@@ -150,7 +150,7 @@ format. Here is the model:
{
name: 'SALES',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.csv.CsvSchemaFactory',
+ factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
operand: {
directory: 'target/test-classes/sales'
}
@@ -161,9 +161,11 @@ format. Here is the model:
The model defines a single schema called 'SALES'. The schema is
powered by a plugin class,
-<a href="src/main/java/net/hydromatic/optiq/impl/csv/CsvSchemaFactory.java">net.hydromatic.optiq.impl.csv.CsvSchemaFactory</a>, which is part of the
+<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchemaFactory.java">org.apache.calcite.adapter.csv.CsvSchemaFactory</a>,
+which is part of the
calcite-example-csv project and implements the Calcite interface
-<a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/SchemaFactory.html">SchemaFactory</a>. Its <code>create</code> method instantiates a
+<a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/SchemaFactory.html">SchemaFactory</a>.
+Its <code>create</code> method instantiates a
schema, passing in the <code>directory</code> argument from the model file:
```java
@@ -185,20 +187,20 @@ public Schema create(SchemaPlus parentSchema, String name,
Driven by the model, the schema factory instantiates a single schema
called 'SALES'. The schema is an instance of
-<a href="src/main/java/net/hydromatic/optiq/impl/csv/CsvSchema.java">net.hydromatic.optiq.impl.csv.CsvSchema</a>
+<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java">org.apache.calcite.adapter.csv.CsvSchema</a>
and implements the Calcite interface <a
-href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/Schema.html">Schema</a>.
+href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/Schema.html">Schema</a>.
A schema's job is to produce a list of tables. (It can also list sub-schemas and
table-functions, but these are advanced features and calcite-example-csv does
not support them.) The tables implement Calcite's
-<a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/Table.html">Table</a>
+<a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/Table.html">Table</a>
interface. <code>CsvSchema</code> produces tables that are instances of
-<a href="src/main/java/net/hydromatic/optiq/impl/csv/CsvTable.java">CsvTable</a>
+<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTable.java">CsvTable</a>
and its sub-classes.
Here is the relevant code from <code>CsvSchema</code>, overriding the
-<code><a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/impl/AbstractSchema.html#getTableMap()">getTableMap()</a></code>
+<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/impl/AbstractSchema.html#getTableMap()">getTableMap()</a></code>
method in the <code>AbstractSchema</code> base class.
```java
@@ -228,26 +230,25 @@ protected Map<String, Table> getTableMap() {
continue;
}
tableName = trim(tableName, ".csv");
-
- // Create different sub-types of table based on the "flavor" attribute.
- final Table table;
- switch (flavor) {
- case SCANNABLE:
- table = new CsvScannableTable(file, null);
- break;
- case FILTERABLE:
- table = new CsvFilterableTable(file, null);
- break;
- case TRANSLATABLE:
- table = new CsvTranslatableTable(file, null);
- break;
- default:
- throw new AssertionError("Unknown flavor " + flavor);
- }
+ final Table table = createTable(file);
builder.put(tableName, table);
}
return builder.build();
}
+
+/** Creates different sub-type of table based on the "flavor" attribute. */
+private Table createTable(File file) {
+ switch (flavor) {
+ case TRANSLATABLE:
+ return new CsvTranslatableTable(file, null);
+ case SCANNABLE:
+ return new CsvScannableTable(file, null);
+ case FILTERABLE:
+ return new CsvFilterableTable(file, null);
+ default:
+ throw new AssertionError("Unknown flavor " + flavor);
+ }
+}
```
The schema scans the directory and finds all files whose name ends
@@ -284,7 +285,7 @@ Here is a schema that defines a view:
{
name: 'SALES',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.csv.CsvSchemaFactory',
+ factory: 'org.apache.calcite.adapter.csv.CsvSchemaFactory',
operand: {
directory: 'target/test-classes/sales'
},
@@ -349,7 +350,7 @@ There is an example in <code>model-with-custom-table.json</code>:
{
name: 'EMPS',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.csv.CsvTableFactory',
+ factory: 'org.apache.calcite.adapter.csv.CsvTableFactory',
operand: {
file: 'target/test-classes/sales/EMPS.csv.gz',
flavor: "scannable"
@@ -378,9 +379,9 @@ sqlline> SELECT empno, name FROM custom_table.emps;
```
The schema is a regular one, and contains a custom table powered by
-<a href="src/main/java/net/hydromatic/optiq/impl/csv/CsvTableFactory.java">net.hydromatic.optiq.impl.csv.CsvTableFactory</a>,
+<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTableFactory.java">org.apache.calcite.adapter.csv.CsvTableFactory</a>,
which implements the Calcite interface
-<a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/TableFactory.html">TableFactory</a>.
+<a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/TableFactory.html">TableFactory</a>.
Its <code>create</code> method instantiates a <code>CsvScannableTable</code>,
passing in the <code>file</code> argument from the model file:
@@ -475,35 +476,35 @@ flavor: "translatable"
This causes a <code>CsvSchema</code> to be created with
<code>flavor = TRANSLATABLE</code>,
and its <code>createTable</code> method creates instances of
-<a href="src/main/java/net/hydromatic/optiq/impl/csv/CsvSmartTable.java">CsvSmartTable</a>
+<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTranslatableTable.java">CsvTranslatableTable</a>
rather than a <code>CsvScannableTable</code>.
-<code>CsvSmartTable</code> overrides the
-<code><a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/TranslatableTable#toRel()">TranslatableTable.toRel()</a></code>
+<code>CsvTranslatableTable</code> implements the
+<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/schema/TranslatableTable.html#toRel()">TranslatableTable.toRel()</a></code>
method to create
-<a href="src/main/java/net/hydromatic/optiq/impl/csv/CsvTableScan.java">CsvTableScan</a>.
+<a href="../example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvTableScan.java">CsvTableScan</a>.
Table scans are the leaves of a query operator tree.
The usual implementation is
-<code><a href="http://www.hydromatic.net/calcite/apidocs/net/hydromatic/optiq/impl/java/JavaRules.EnumerableTableAccessRel.html">EnumerableTableAccessRel</a></code>,
+<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/adapter/enumerable/EnumerableTableScan.html">EnumerableTableScan</a></code>,
but we have created a distinctive sub-type that will cause rules to fire.
Here is the rule in its entirety:
```java
-public class CsvPushProjectOntoTableRule extends RelOptRule {
- public static final CsvPushProjectOntoTableRule INSTANCE =
- new CsvPushProjectOntoTableRule();
+public class CsvProjectTableScanRule extends RelOptRule {
+ public static final CsvProjectTableScanRule INSTANCE =
+ new CsvProjectTableScanRule();
- private CsvPushProjectOntoTableRule() {
+ private CsvProjectTableScanRule() {
super(
- operand(ProjectRel.class,
+ operand(Project.class,
operand(CsvTableScan.class, none())),
- "CsvPushProjectOntoTableRule");
+ "CsvProjectTableScanRule");
}
@Override
public void onMatch(RelOptRuleCall call) {
- final ProjectRel project = call.rel(0);
+ final Project project = call.rel(0);
final CsvTableScan scan = call.rel(1);
int[] fields = getProjectFields(project.getProjects());
if (fields == null) {
@@ -537,7 +538,7 @@ The constructor declares the pattern of relational expressions that will cause
the rule to fire.
The <code>onMatch</code> method generates a new relational expression and calls
-<code><a href="http://www.hydromatic.net/calcite/apidocs/org/eigenbase/relopt/RelOptRuleCall.html#transformTo(org.eigenbase.rel.RelNode)">RelOptRuleCall.transformTo()</a></code>
+<code><a href="http://www.hydromatic.net/calcite/apidocs/org/apache/calcite/plan/RelOptRuleCall.html#transformTo(org.apache.calcite.rel.RelNode)">RelOptRuleCall.transformTo()</a></code>
to indicate that the rule has fired successfully.
## The query optimization process
@@ -589,7 +590,7 @@ For example, this schema reads from a MySQL "foodmart" database:
{
name: 'FOODMART',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.jdbc.JdbcSchema$Factory',
+ factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory',
operand: {
jdbcDriver: 'com.mysql.jdbc.Driver',
jdbcUrl: 'jdbc:mysql://localhost/foodmart',
@@ -635,7 +636,7 @@ For example, the following model reads tables from a MySQL
{
name: 'FOODMART_CLONE',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.clone.CloneSchema$Factory',
+ factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
operand: {
jdbcDriver: 'com.mysql.jdbc.Driver',
jdbcUrl: 'jdbc:mysql://localhost/foodmart',
@@ -659,7 +660,7 @@ defined earlier in the model, like this:
{
name: 'FOODMART',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.jdbc.JdbcSchema$Factory',
+ factory: 'org.apache.calcite.adapter.jdbc.JdbcSchema$Factory',
operand: {
jdbcDriver: 'com.mysql.jdbc.Driver',
jdbcUrl: 'jdbc:mysql://localhost/foodmart',
@@ -670,7 +671,7 @@ defined earlier in the model, like this:
{
name: 'FOODMART_CLONE',
type: 'custom',
- factory: 'net.hydromatic.optiq.impl.clone.CloneSchema$Factory',
+ factory: 'org.apache.calcite.adapter.clone.CloneSchema$Factory',
operand: {
source: 'FOODMART'
}
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/b66ff933/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java
----------------------------------------------------------------------
diff --git a/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java b/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java
index f4e6a5d..521987b 100644
--- a/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java
+++ b/example/csv/src/main/java/org/apache/calcite/adapter/csv/CsvSchema.java
@@ -90,25 +90,25 @@ public class CsvSchema extends AbstractSchema {
}
tableName = trim(tableName, ".csv");
- // Create different sub-types of table based on the "flavor" attribute.
- final Table table;
- switch (flavor) {
- case TRANSLATABLE:
- table = new CsvTranslatableTable(file, null);
- break;
- case SCANNABLE:
- table = new CsvScannableTable(file, null);
- break;
- case FILTERABLE:
- table = new CsvFilterableTable(file, null);
- break;
- default:
- throw new AssertionError("Unknown flavor " + flavor);
- }
+ final Table table = createTable(file);
builder.put(tableName, table);
}
return builder.build();
}
+
+ /** Creates different sub-type of table based on the "flavor" attribute. */
+ private Table createTable(File file) {
+ switch (flavor) {
+ case TRANSLATABLE:
+ return new CsvTranslatableTable(file, null);
+ case SCANNABLE:
+ return new CsvScannableTable(file, null);
+ case FILTERABLE:
+ return new CsvFilterableTable(file, null);
+ default:
+ throw new AssertionError("Unknown flavor " + flavor);
+ }
+ }
}
// End CsvSchema.java