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 2014/08/19 01:17:58 UTC

[5/5] git commit: Move several .md files into new 'doc' directory, to keep the root directory simple.

Move several .md files into new 'doc' directory, to keep the root directory simple.


Project: http://git-wip-us.apache.org/repos/asf/incubator-optiq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-optiq/commit/778a0c51
Tree: http://git-wip-us.apache.org/repos/asf/incubator-optiq/tree/778a0c51
Diff: http://git-wip-us.apache.org/repos/asf/incubator-optiq/diff/778a0c51

Branch: refs/heads/master
Commit: 778a0c5168111661f74d37016902a10241f0a137
Parents: d43ec94
Author: Julian Hyde <jh...@apache.org>
Authored: Mon Aug 18 16:17:13 2014 -0700
Committer: Julian Hyde <jh...@apache.org>
Committed: Mon Aug 18 16:17:13 2014 -0700

----------------------------------------------------------------------
 HISTORY.md                | 657 -----------------------------------------
 HOWTO.md                  | 366 -----------------------
 INCUBATOR_PROPOSAL.md     | 341 ---------------------
 MODEL.md                  | 256 ----------------
 README                    |   4 +-
 README.md                 |  14 +-
 REFERENCE.md              | 446 ----------------------------
 doc/HISTORY.md            | 657 +++++++++++++++++++++++++++++++++++++++++
 doc/HOWTO.md              | 380 ++++++++++++++++++++++++
 doc/INCUBATOR_PROPOSAL.md | 341 +++++++++++++++++++++
 doc/MODEL.md              | 256 ++++++++++++++++
 doc/REFERENCE.md          | 446 ++++++++++++++++++++++++++++
 12 files changed, 2089 insertions(+), 2075 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/778a0c51/HISTORY.md
----------------------------------------------------------------------
diff --git a/HISTORY.md b/HISTORY.md
deleted file mode 100644
index e1d1432..0000000
--- a/HISTORY.md
+++ /dev/null
@@ -1,657 +0,0 @@
-# Apache Optiq release history
-
-For a full list of releases, see <a href="https://github.com/julianhyde/optiq/releases">github</a>.
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-0.9.0">0.9.0</a> / 2014-08-xx
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-371">OPTIQ-371</a>]
-  Implement `JOIN` whose `ON` clause contains mixed equi and theta
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-369">OPTIQ-369</a>]
-  Add `EnumerableSemiJoinRel`, implementation of semi-join in enumerable
-  convention
-* Add class `Strong`, for detecting null-rejecting predicates.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-368">OPTIQ-368</a>]
-  Add SemiJoinRule, planner rule to convert project-join-aggregate into semi-join
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-367">OPTIQ-367</a>]
-  `PushFilterPastJoinRule` should strengthen join type
-* Add `EquiJoinRel`, base class for joins known to be equi-joins.
-* Implement `CAST(&lt;string&gt; AS &lt;datetime&gt;)` and
-  `&lt;datetime&gt; + &lt;interval&gt;`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-360">OPTIQ-360</a>]
-  Introduce a rule to infer predicates from equi-join conditions
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-349">OPTIQ-349</a>]
-  Add heuristic join-optimizer that can generate bushy joins
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-346">OPTIQ-346</a>]
-  Add commutative join rule
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-347">OPTIQ-347</a>]
-  In `SqlRun`, add `!plan` command
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-314">OPTIQ-314</a>]
-  Allow simple UDFs based on methods
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-327">OPTIQ-327</a>]
-  Rules should use base class to find rule match & use factory for object
-  creation
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-316">OPTIQ-316</a>]
-  In `SqlRun`, match output regardless of order if `ORDER BY` not present
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-300">OPTIQ-300</a>]
-  Support multiple parameters in `COUNT(DISTINCT x, y, ...)`
-
-API changes
-* Remove deprecated methods.
-* Convert `Hook` to use Guava `Function` (was linq4j `Function1`).
-* Add fluent method `withHook`, to more easily add hooks in tests.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-321">OPTIQ-321</a>]
-  Add support for overriding implementation of `CompoundIdentifier` in
-  `SqlParser`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-322">OPTIQ-322</a>]
-  Add support for `SqlExplain`, `SqlOrderBy` and `SqlWith` to support
-  `SqlShuttle` use.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-323">OPTIQ-323</a>]
-  Override `SqlUnresolvedFunction.inferReturnType()` to return `ANY` type
-  so framework implementors can support late bound function implementations.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-324">OPTIQ-324</a>]
-  Add `ViewExpander` for `Planner` in `Frameworks`. Expose additional
-  properties of `ViewTable` to allow subclassing.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-247">OPTIQ-247</a>]
-  Add `Context` and `FrameworkConfig`
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-372">OPTIQ-372</a>]
-  Change `LoptOptimizeJoinRule` &amp; `PushFilterPast`* rules to use factory
-* Upgrade `maven-checkstyle-plugin`.
-* Add class `Holder`, a mutable slot that can contain one object.
-* Remove the 2-minute wait at the top of the hour for tests of
-  `CURRENT_TIME`, etc.
-* Tune `ImmutableIntList`'s iterators.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-364">OPTIQ-364</a>]
-  Validator rejects valid `WITH ... ORDER BY` query
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-363">OPTIQ-363</a>]
-  Use `dependencyManagement` and `pluginManagement` in POM files
-* Add `FilterFactory`.
-* Add `README` file, incubation disclaimers, and how-to build and running tests.
-* Add `KEYS` and start how-to for making snapshots and releases.
-* Capital case component names; inherit license info from Apache parent POM.
-* Only run `apache-rat` and `git-commit-id-plugin` in "release" maven profile.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-348">OPTIQ-348</a>]
-  Add Apache RAT as maven plugin
-* Change license headers from "Julian Hyde" to "ASF"; add headers where missing.
-* Fix build breakage on JDK 1.6 due to missing method `BitSet.previousClearBit`.
-* Refactor test infrastructure to allow testing against heuristic bushy-join
-  optimizer.
-* Add methods and tests for BitSets, and re-organize tests.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-354">OPTIQ-354</a>]
-  Change maven groupId to "org.apache.optiq"
-* Specify return type when calling `RexBuilder.makeCall`, if possible.
-* Eliminate duplicate conditions in `RexProgramBuilder.addCondition`, not
-  `RexBuilder.makeCall` as previously.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-345">OPTIQ-345</a>]
-  `AssertionError` in `RexToLixTranslator` comparing to date literal
-* Restore `PushFilterPastJoinRule` to `RelDecorrelator`; interim pending
-  [<a href="https://issues.apache.org/jira/browse/OPTIQ-343">OPTIQ-343</a>]
-  fix.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-340">OPTIQ-340</a>]
-  Fix bug in `SqlToRelConverter` when push expressions in join condtions into
-  `ProjectRel`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-313">OPTIQ-313</a>]
-  Query decorrelation fails
-* While unifying a `RelNode` tree with a materialized view expression,
-  switch representation to `MutableRel`s.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-305">OPTIQ-305</a>]
-  Unit test failure on release candidates
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-325">OPTIQ-325</a>]
-  Use Java list instead of Guava list to avoid null checks in case of
-  `SqlTypeExplicitPrecedenceList`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-326">OPTIQ-326</a>]
-  Fix `RelOptUtil` `ANY` type check.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-303">OPTIQ-303</a>]
-  Migrate issue URLs
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-331">OPTIQ-331</a>]
-  Precision/scale compatibility checks should always succeed for `ANY` type
-* In `SqlRun`, allow `!plan` after `!ok` for same SQL statement.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-318">OPTIQ-318</a>]
-  Add unit test for `SqlRun`
-* Fix a bug where composite `SELECT DISTINCT` would return duplicate rows.
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.8">0.8</a> / 2014-06-27
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-310">OPTIQ-310</a>]
-   Implement LEAD, LAG and NTILE windowed aggregates
-* Reduce `COUNT(not-null-expression)` to `COUNT()`
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-292">OPTIQ-292</a>]
-   Improve windowed aggregate return types
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-302">OPTIQ-302</a>]
-   Use heuristic rule to plan queries with large numbers of joins
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-283">OPTIQ-283</a>]
-  Add TPC-DS data generator
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-294">OPTIQ-294</a>]
-  Implement DENSE_RANK windowed aggregate function
-* SqlRun utility
-  * [<a href="https://issues.apache.org/jira/browse/OPTIQ-290">OPTIQ-290</a>]
-    Add `SqlRun`, an idempotent utility for running SQL test scripts
-  * Add "!skip" command to SqlRun.
-  * Add MySQL formatting mode to SqlRun.
-
-API changes
-* Re-organize planner initialization,
-  to make it easier to use heuristic join order.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-301">OPTIQ-301</a>]
-  Add `Program` interface, a planner phase more general than current `RuleSet`
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-263">OPTIQ-263</a>]
-  Add operand type that will cause a rule to fire when a new subset is created
-* Clean up and document SqlKind.
-  * Add `IS_NOT_TRUE` and `IS_NOT_FALSE` `SqlKind` enums.
-  * Add `SqlKind.IS_NOT_NULL` enum value, and use where possible,
-    including for `IS_NOT_UNKNOWN` operator.
-
-Bug-fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-312">OPTIQ-312</a>]
-  Trim non-required fields before `WindowRel`
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-311">OPTIQ-311</a>]
-  Wrong results when filtering the results of windowed aggregation
-* More tests for `WITH ... ORDER BY`
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-309">OPTIQ-309</a>]
-  `WITH ... ORDER BY` query gives `AssertionError`
-* Enable `MultiJoinRel` and some other planner rule tests.
-* Add `ImmutableNullableList` and `UnmodifiableArrayList`,
-  and remove calls to `Arrays.asList`.
-* Add method `IntPair.zip`.
-* Reimplement regular and windowed aggregates
-* Switch from github to Apache JIRA for issues tracking.
-  * In release history, update issue URLs from github to Apache JIRA
-* The Apache mailing list is now the official mailing list. Add presentations.
-* Add test for overloaded UDF.
-* Add tests for `NOT IN` where sub-query returns NULL values.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-288">OPTIQ-288</a>]
-  Add tests for windowed aggregation based on Postgres reference queries
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-286">OPTIQ-286</a>]
-  Error casting MongoDB date
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-284">OPTIQ-284</a>]
-  Window functions range defaults to `CURRENT ROW`
-* [<a href=https://issues.apache.org/jira/browse/OPTIQ-285">OPTIQ-285</a>]
-  Window functions throw exception without `ORDER BY`
-* Test case for
-  [<a href=““https://issues.apache.org/jira/browse/OPTIQ-285”>OPTIQ-285</a>].
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-281">OPTIQ-281</a>]
-  `EXTRACT` function's SQL return type is `BIGINT` but implemented as Java `int`
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.7">0.7</a> / 2014-05-13
-
-New features
-* Implement table functions.
-* Arrays and multi-sets:
-  * [<a href="https://issues.apache.org/jira/browse/OPTIQ-267">OPTIQ-267</a>]
-    Improve support for ARRAY data type
-  * Better type information for JDBC Array; nested array now possible.
-  * Implement `JOIN LATERAL` and `JOIN UNNEST`.
-  * Implement the `UNNEST` relational operator, and various improvements
-    to `ARRAY` and `MULTISET` data types.
-  * Represent `ARRAY` columns as Java lists.
-  * Implement `CARDINALITY(ARRAY)` SQL operator.
-* Implement scalar sub-query in `SELECT` clause.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-273">OPTIQ-273</a>]
-  Support column alias in WITH queries (common table expressions)
-* Windowed aggregates:
-  * Aggregate over constants, e.g. `SUM(1) OVER (ROWS 10 PRECEDING)`;
-  * `UNBOUNDED PRECEDING` window range;
-  * Windowed aggregates computed over primitive scalars.
-* Fix return type inference for aggregate calls. If the `GROUP BY` clause is
-  empty, `SUM` may return null.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-37">OPTIQ-37</a>]
-  Document JSON model file format (as <a href="MODEL.md">MODEL.md</a>).
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-238">OPTIQ-238</a>]
-  Add adapter that generates TPC-H data
-* Improve exception message in `AvaticaConnection`; add
-  `ExceptionMessageTest`.
-* Implement micro-benchmarks via
-  <a href="http://openjdk.java.net/projects/code-tools/jmh/">JMH</a>.
-
-API changes
-* Provide an option to create root schema without the "metadata" schema.
-* Schema SPI:
-  * [<a href="https://issues.apache.org/jira/browse/OPTIQ-175">OPTIQ-175</a>]
-    Modify Schema SPI to allow caching
-  * Get sub-schemas defined by a Schema SPI, and cache their `OptiqSchema`
-    wrappers. (Tobi Vollebregt and Julian Hyde)
-* SqlAdvisor callable from client via JDBC.
-
-Bug-fixes and internal changes
-* Add Apache incubator proposal.
-* Rename RELEASE.md to HISTORY.md.
-* Upgrade maven-release-plugin.
-* Upgrade to linq4j-0.3.
-* Code generation improvements:
- * Move code-generation optimizer to linq4j;
- * Improve translation of strict functions;
- * Mark most methods in `SqlFunctions` as `@Deterministic`;
- * Support `static final` constants generated by linq4j.
- * Avoid excessive box and unbox of primitives when using `Object[]` storage.
- * In JDBC result set, avoid row computation on each accessor call.
-* Test composite join conditions in various flavors of outer join.
-* Use `fromTrait` of the just previously converted `RelNode` instead
-  of the original `RelNode`.
-* Disable a MongoDB test, pending
-  [<a href="https://issues.apache.org/jira/browse/OPTIQ-270">OPTIQ-270</a>.
-* Hush warnings from `SplunkAdapterTest` if Splunk is not available.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-252">OPTIQ-252</a>]
-  Scalar sub-query that returns 0 rows should become NULL value
-* `SplunkAdapterTest` now uses the same Foodmart database as `JdbcTest`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-242">OPTIQ-242</a>]
-  SplunkAdapterTest fails
-* Remove some obsolete classes.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-205">OPTIQ-205</a>]
-  Suspicious map.get in VolcanoPlanner.reregister
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.6">0.6</a> / 2014-04-11
-
-New features
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-214">OPTIQ-214</a>]
-  Modify Frameworks to allow Schema to be re-used
-  Obsoletes `name` field of `ReflectiveSchema`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-237">OPTIQ-237</a>]
-  Allow user-defined aggregate functions (UDAs) to be defined in a model
-* Fix <a href="https://github.com/julianhyde/optiq/pull/227">OPTIQ-227</a>,
-  "Extend `EXTRACT` function to support `DATE`, `TIME` and `TIMESTAMP` values".
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-222">OPTIQ-222</a>]
-  User-defined table macros
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-179">OPTIQ-179</a>]
-  Optiq on Windows
-  * Add `sqlline.bat` and fix issues running `sqlline` under Cygwin.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-195">OPTIQ-195</a>]
-  Push aggregation into MongoDB adapter
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-193">OPTIQ-193</a>]
-  Implement OFFSET and LIMIT in MongoDB adapter
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-164">OPTIQ-164</a>]
-  Improve query performance of optiq over MongoDB
-* Add Phoenix (HBase) SQL dialect (Bruno Dumon)
-
-API changes
-* Obsolete `RexImpTable.AggregateImplementor` and rename `AggImplementor2`.
-  (**This is a breaking change**.)
-* Convert `CombinedParser.jj` into freemarker template to allow
-  custom parser implementations. (Venki Korukanti)
-* Extend `Planner` to pass a custom `ConvertletTable` and custom SQL parser.
-* In `Frameworks`, add a way to specify list of `TraitDef`s that will be used
-  by planner. (Jinfeng Ni)
-* Fix <a href="https://github.com/julianhyde/optiq/pull/198">OPTIQ-198</a>,
-  "Use `RexExecutor` to evaluate projections and filters".
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-219">OPTIQ-219</a>]
-  Parse `ALTER scope SET option = value` statement
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-215">OPTIQ-215</a>]
-  A Schema should not have to remember its name and parent
-  (**This is a breaking change**.)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-180">OPTIQ-180</a>]
-  Common base class for TableFunction, ScalarFunction
-  (**This is a breaking change**.)
-* Add methods for dealing with symbols; deprecate
-  `SqlLiteral.booleanValue(SqlNode)`, `SqlLiteral.symbolValue(SqlNode)`.
-* Add `RelOptPlanner.clear()`; now it is safe to call `transform` twice.
-  (Jinfeng Ni)
-* Remove APIs deprecated for 0.5.
-* Move around some operator classes and singletons.
-
-Bug fixes and internal changes
-* Upgrade to linq4j-0.2.
-* `FETCH` and `LIMIT` are ignored during SQL-to-RelNode translation.
-  (Venki Korukanti)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-245">OPTIQ-245</a>]
-  Off-by-one translation of ON clause of JOIN
-* Fix <a href="https://github.com/julianhyde/optiq/pull/191">OPTIQ-191</a>,
-  "Rotate time/date/timestamp vals to local timezone".
-* Fix <a href="https://github.com/julianhyde/optiq/pull/244">OPTIQ-244</a>,
-  "`RelOptTableImpl.create` always expects `QueryableTable` type in
-  `OptiqSchema.TableEntry`".
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-225">OPTIQ-225</a>]
-  Optiq doesn't correctly decorrelate queries
-* Clean up package-info.  Remove duplicates in test packages so they
-  don't conflict with those in non-test packages.
-* Add `Pair.adjacents(Iterable)`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-199">OPTIQ-199</a>]
-  Various `ANY` type conditions aren't correctly being considered
-  (Jacques Nadeau)
-* Add files to `.gitignore` that shouldn't be checked in when using
-  Eclipse. (Jacques Nadeau)
-* Add class `ControlFlowException`, and make it base class of
-  existing control-flow exception classes.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-232">OPTIQ-232</a>]
-  Sum and avg of empty set should be null as per SQL specification
-* Add `SqlUnresolvedFunction`, to improve how return type of
-  user-defined functions is resolved. (Vladimir Sitnikov)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-228">OPTIQ-228</a>]
-  Error while compiling generated Java code when using UDF in expression
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-226">OPTIQ-226</a>]
-  User-defined functions should work without explicit schema prefix
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-229">OPTIQ-229</a>]
-  Join between different JDBC schemas not implementable
-* Fix <a href="https://github.com/julianhyde/optiq/pull/230">OPTIQ-230</a>,
-  "RemoveSortRule derives trait set from sort, should derive it from sort's child".
-* Test view and sub-query with `ORDER BY` and `LIMIT`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-223">OPTIQ-223</a>]
-  Add `NOTICE` and `LICENSE` files in all generated JAR files
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-209">OPTIQ-209</a>]
-  Consistent strategy for line-endings in tests
-  Convert uses of `NL` in tests to Linux newline "\n".
-  This makes string constants simpler.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-218">OPTIQ-218</a>]
-  Functions case sensitive when using `Lex.MYSQL`
-* Add tests that a query with aggregate expressions in the `SELECT`
-  clause is considered an aggregate query, even if there is no `GROUP BY`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-216">OPTIQ-216</a>]
-  Inconsistent use of provided operator table causes inability to
-  add aggregate functions
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-200">OPTIQ-200</a>]
-  Javadoc generation fails under JDK 1.8
-* Add class `XmlOutput` (based on `org.eigenbase.xom.XMLOutput`) and remove
-  dependency on eigenbase-xom.
-* Performance: Don't create stack-trace for exceptions used for control-flow.
-  (Vladimir Sitnikov)
-* Performance: Tune `RexProgramBuilder` by using `Pair` rather than `String` as
-  expression key. (Vladimir Sitnikov)
-* Fix NPE using TRIM function with JDBC. (Bruno Dumon)
-* Add dependency on
-  <a href="https://github.com/julianhyde/hydromatic-resource">hydromatic-resource-maven-plugin</a>
-  and obsolete our copy of the resource framework.
-* Fix race condition in `SpaceList`.
-* In planner, use `RelTrait.subsumes` rather than `equals` in an assert. (Jinfeng Ni)
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.5">0.5</a> / 2014-03-14
-
-New features
-* Allow `quoting`, `quotedCasing`, `unquotedCasing`, and `caseSensitive`
-  properties to be specified explicitly (Vladimir Sitnikov)
-* Recognize more kinds of materializations, including filter-on-project (where
-  project contains expressions) and some kinds of aggregation.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-128">OPTIQ-128</a>]
-  Support `WITH` queries (common table expressions)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-53">OPTIQ-53</a>]
-  Allow `WHEN` clause in simple `CASE` expression to have multiple values
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-156">OPTIQ-156</a>]
-  Optiq should recognize 'SYSTEM TABLE', 'JOIN', 'INDEX' as table types
-* Support querying ARRAY columns from JDBC source. (Gabriel Reid)
-
-API changes
-* Add `ProjectRelBase.copy(RelTraitSet, RelNode, List&lt;RexNode&gt;,
-  RelDataType)` and make `ProjectRelBase.copy(RelTraitSet, RelNode)` final.
-  (**This is a breaking change** for sub-classes of `ProjectRelBase`.)
-* Change `RexBuilder.makeRangeReference` parameter type.
-* `RexBuilder.makeInputRef` replaces `RelOptUtil.createInputRef`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-160">OPTIQ-160</a>]
-  Allow comments in schema definitions
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-147">OPTIQ-147</a>]
-  Create a new kind of `SqlCall` that keeps operands in fields, not an operands
-  array
-  * Very widely used parse tree nodes with complex operands, including
-    `SqlSelect`, `SqlJoin`, `SqlInsert`, and a new node type `SqlOrderBy`, are now
-    sub-classes of `SqlCall` but not `SqlBasicCall`.
-  * (**This is a breaking change** to code that assumes that, say,
-    `SqlSelect` has an `operands` field.)
-* Convert all enum constants to upper-case.
-  (**This is a breaking change**.)
-
-Bug-fixes and internal changes
-* Generate optiq-core-VERSION-tests.jar not parent-VERSION-tests.jar.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-176">OPTIQ-176</a>]
-  ORDER BY expression doesn't work with SELECT \*
-* Fix VARCHAR casts sent to hsqldb source (Bruno Dumon)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-143">OPTIQ-143</a>]
-  Remove dependency on eigenbase-resgen
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-173">OPTIQ-173</a>]
-  Case-insensitive table names are not supported for `Casing.UNCHANGED`
-* `DATE.getLimit` now returns `Calendar` in GMT time zone (Vladimir Sitnikov)
-* Set `en_US` locale in tests that match against error numbers, dates
-  (Vladimir Sitnikov)
-* Use 1 test thread per CPU to avoid thread starvation on dual core CPUs
-  (Vladimir Sitnikov)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-174">OPTIQ-174</a>]
-  Move hsqldb to test scope
-* Add unit tests for `RexExecutorImpl`.
-* Correct JSON model examples in Javadoc comments. (Karel Vervaeke)
-* Move test reference logs from `src/test/java` to `src/test/resources`
-  (reduces the number of 'untracked files' reported by git)
-* Tune `Util.SpaceList`, fix race condition, and move into new utility class
-  `Spaces`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-163">OPTIQ-163</a>]
-  Equi-join warning
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-157">OPTIQ-157</a>]
-  Handle `SQLFeatureNotSupported` when calling `setQueryTimeout`
-  (Karel Vervaeke)
-* Fix Optiq on Windows. (All tests and checkstyle checks pass.)
-* In checkstyle, support Windows-style file separator, otherwise build fails in
-  Windows due to suppressions not used. (Vladimir Sitnikov)
-* Enable MongoDB tests when `-Doptiq.test.mongodb=true`.
-* Cleanup cache exception-handling and an assert.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-153">OPTIQ-153</a>]
-  Error using MongoDB adapter: Failed to set setXIncludeAware(true)
-* Disable spark engine unless Spark libraries are on the class path and
-  `spark=true` is specified in the connect string.
-* Fix path to `mongo-zips-model.json` in HOWTO. (Mariano Luna)
-* Fix bug deriving the type of a join-key.
-* Fix the value of `ONE_MINUS_EPSILON`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-158">OPTIQ-158</a>]
-  Optiq fails when call `Planner.transform()` multiple times, each with
-  different ruleset
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-148">OPTIQ-148</a>]
- Less verbose description of collation. Also, optimize `RelTraitSet` creation
- and amortize `RelTraitSet.toString()`.
-* Add generics to SQL parser.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-145">OPTIQ-145</a>]
-  Unexpected upper-casing of keywords when using java lexer
-* Remove duplicate `maven-source-plugin`.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-141">OPTIQ-141</a>]
-  Downgrade to guava-11.0.2. (This is necessary for Hadoop compatibility.
-  Later versions of Guava can also be used.)
-* Upgrade to spark-0.9.0. (Because this version of spark is available from
-  maven-central, we can make optiq-spark part of the regular build, and remove
-  the spark profile.)
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.4.18">0.4.18</a> / 2014-02-14
-
-API and functionality changes
-* Configurable lexical policy
-    * [<a href="https://issues.apache.org/jira/browse/OPTIQ-33">OPTIQ-33</a>]
-      SQL parser should allow different identifier quoting
-    * [<a href="https://issues.apache.org/jira/browse/OPTIQ-34">OPTIQ-34</a>]
-      Policy for case-sensitivity of identifiers should be configurable
-    * New connect-string parameter "lex", with allowable values
-      "ORACLE", "MYSQL", "SQL_SERVER", "JAVA" sets policy to be like those
-      databases, in terms of quote string, whether quoted and unquoted
-      identifiers are converted to upper/lower case, and whether
-      identifiers are matched case-sensitively. "JAVA" is case-sensitive,
-      even for unquoted identifiers. It should be possible
-      for each connection to have its own settings for these. Objects
-      shared between sessions (views, materialized views) might
-      require more work.
-    * Added various internals to make it easy for developers to do the
-      right thing. When you need to look up a schema, table or
-      column/field name, you should use a catalog reader, and it will
-      apply the right case-sensitivity policy.
-    * Enable optiq consumer to utilize different lexical settings in
-      Frameworks/Planner. (Jacques Nadeau)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-135">OPTIQ-115</a>]
-  Add a PARSE_TREE hook point with SqlNode parameter
-* Change planner rules to use `ProjectFactory` for creating
-  projects. (John Pullokkaran)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-131">OPTIQ-131</a>]
-  Add interfaces for metadata (statistics)
-  (**This is a breaking change**.)
-* Update Avatica to allow `Cursor` & `Accessor` implementations to throw
-  `SQLException`. (Jacques Nadeau)
-* Separate cost model (`RelOptCostFactory`) from planner. Allow
-  `VolcanoPlanner` to be sub-classed with different cost factory.
-    * Remove references to VolcanoCost from RelSubset, so clients can
-      use a different `RelOptCost`. (Harish Butani)
-    * Make `VolcanoCost` immutable.
-* Break `SqlTypeStrategies` into `OperandTypes`, `ReturnTypes` and
-  `InferTypes`, and rename its static members to upper-case, per
-  checkstyle. (**This is a breaking change**.)
-* Add a mechanism for defining configuration parameters and have them
-  appear in the responses to `AvaticaDatabaseMetaData` methods.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-113">OPTIQ-113</a>]
-  User-defined scalar functions
-* Add rules to short-cut a query if `LIMIT 0` is present. Also remove
-  sort, aggregation, join if their inputs are known to be empty, and
-  propagate the fact that the relational expressions are known to be
-  empty up the tree. (We already do this for union, filter, project.)
-* `RexNode` and its sub-classes are now immutable.
-
-Bug fixes and internal changes
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-61">OPTIQ-16</a>]
-  Upgrade to janino-2.7
-* Upgrade to guava-15.0 (guava-14.0.1 still allowed), sqlline-1.1.7,
-  maven-surefire-plugin-2.16, linq4j-0.1.13.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-136">OPTIQ-136</a>]
-  Support Hive dialect
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-138">OPTIQ-138</a>]
-  SqlDataTypeSpec.clone handles collection types wrong
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-137">OPTIQ-137</a>]
-  If a subset is created that is subsumed by an existing subset, its
-  'best' is not assigned
-    * If best rel in a Volcano subset doesn't have metadata, see if
-      other rels have metadata.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-127">OPTIQ-127</a>]
-  EnumerableCalcRel can't support 3+ AND conditions (Harish Butani)
-* Fix push-down of datetime literals to JDBC data sources.
-* Add `Util.startsWith(List, List)` and `Util.hashCode(double)`.
-* Add maven-checkstyle-plugin, enable in "verify" phase, and fix exceptions.
-* Fix `SqlValidator` to rely on `RelDataType` to do field name matching.  Fix
-  `RelDataTypeImpl` to correctly use the case sensitive flag rather than
-  ignoring it.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-119">OPTIQ-119</a>]
-  Comparing Java type long with SQL type INTEGER gives wrong answer
-* Enable multi-threaded testing, and fix race conditions.
-    * Two of the race conditions involved involving trait caches. The
-      other was indeterminacy in type system when precision was not
-      specified but had a default; now we canonize TIME to TIME(0), for
-      instance.
-* Convert files to `us-ascii`.
-* Work around
-  [<a href="http://jira.codehaus.org/browse/JANINO-169">JANINO-169</a>].
-* Refactor SQL validator testing infrastructure so SQL parser is
-  configurable.
-* Add `optiq-mat-plugin` to README.
-* Fix the check for duplicate subsets in a rule match.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-112">OPTIQ-112</a>]
-  Java boolean column should be treated as SQL boolean
-* Fix escaped unicode characters above 0x8000. Add tests for unicode
-  strings.
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.4.17">0.4.17</a> / 2014-01-13
-
-API changes
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-106">OPTIQ-106</a>]
-  Make `Schema` and `Table` SPIs simpler to implement, and make them
-  re-usable across connections
-  (**This is a breaking change**.)
-* Make it easier to define sub-classes of rule operands. The new class
-  `RelOptRuleOperandChildren` contains the children of an operand and
-  the policy for dealing with them. Existing rules now use the new
-  methods to construct operands: `operand()`, `leaf()`, `any()`, `none()`,
-  `unordered()`. The previous methods are now deprecated and will be
-  removed before 0.4.18. (**This is a breaking change**.)
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-101">OPTIQ-101</a>]
-  Enable phased access to the Optiq engine
-* List-handling methods in `Util`: add methods `skipLast`, `last`, `skip`; remove `subList`, `butLast`.
-* Convert `SqlIdentifier.names` from `String[]` to `ImmutableList<String>`.
-* Rename `OptiqAssert.assertThat()` to `that()`, to avoid clash with junit's `Assert.assertThat()`.
-* Usability improvements for `RelDataTypeFactory.FieldInfoBuilder`. It
-  now has a type-factory, so you can just call `build()`.
-* Rework `HepProgramBuilder` into a fluent API.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-105">OPTIQ-105</a>]
-  Externalize RelNode to and from JSON
-
-Tuning
-* If `EnumerableAggregateRel` has no aggregate functions, generate a
-   call to `Enumerable.distinct()`, thereby saving the effort of
-   building trivial accumulators.
-* Default rule set now does not introduce `CalcRel` until a later phase
-  of planning. This reduces the number of trivial projects and calcs
-  created, merged, and elimated.
-* Reduce the amount of time spent creating record types that
-  already exist.
-* More efficient implementation of `Util.isDistinct` for small lists.
-* When an internal record has 0 fields, rather than generating a
-  synthetic class and lots of instances that are all the same, use the
-  new `Unit` class, which is a singleton.
-* To take advantage of asymmetric hash join added recently in linq4j,
-  tweak cost of `EnumerableJoinRel` so that join is cheaper if the
-  larger input is on the left, and more expensive if it is a cartesian
-  product.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-70">OPTIQ-70</a>]
-  Joins seem to be very expensive in memory
-* Make planning process more efficient by not sorting the list of
-  matched rules each cycle. It is sorted if tracing is enabled;
-  otherwise we scan to find the most important element. For this list,
-  replace `LinkedList` with `ChunkList`, which has an O(1) remove and add,
-  a fast O(n) get, and fast scan.
-
-Other
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-87">OPTIQ-87</a>]
-  Constant folding
-  * Rules for constant-expression reduction, and to simplify/eliminate
-    `VALUES` operator.
-* Graph algorithms: Implement breadth-first iterator and cycle-detector.
-* Fix bug in planner which occurred when two `RelNode`s have identical
-  digest but different row-type.
-* Fix link to optiq-csv tutorial.
-* Fix bugs in `RemoveTrivialProjectRule.strip`, `JdbcProjectRel.implement`
-  and `SortRel.computeSelfCost`.
-* Reformat code, and remove `@author` tags.
-* Upgrade to eigenbase-xom-1.3.4, eigenbase-properties-1.1.4,
-  eigenbase-resgen-1.3.6.
-* Upgrade to linq4j-0.1.12.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-97">OPTIQ-97</a>]
-  Correlated EXISTS
-* Fix a bug in `VolcanoCost`.
-* Add class `FoodMartQuerySet`, that contains the 6,700 foodmart queries.
-* Fix factory class names in `UnregisteredDriver`
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-96">OPTIQ-96</a>]
-  LIMIT against a table in a clone schema causes UnsupportedOperationException
-* Disable spark module by default.
-* Allow `CloneSchema` to be specified in terms of url, driver, user,
-  password; not just dataSource.
-* Wrap internal error in `SQLException`.
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.4.16">0.4.16</a> / 2013-11-24
-
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-69">OPTIQ-69</a>]
-  Can't join on string columns and other problems with expressions in the join condition
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-74">OPTIQ-74</a>]
-  JOIN ... USING fails in 3-way join with UnsupportedOperationException.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-65">OPTIQ-65</a>]
-  Fix issues in the JDBC driver, and in particular to DatabaseMetaData methods, to make Squirrel-SQL run better.
-* Fix JDBC column, table, schema names for when the table is not in a schema of depth 1.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-85">OPTIQ-85</a>]
-  Adding a table to the root schema causes breakage in OptiqPrepareImpl
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-84">OPTIQ-84</a>]
-  Extract Optiq's JDBC driver as a new JDBC driver framework, Avatica.
-  Other projects can use this to implement a JDBC driver by implementing
-  just a few methods. If you wish to use Optiq's JDBC driver, you will
-  now need to include optiq-avatica.jar in addition to optiq-core.jar.
-  Avatica does not depend on anything besides the standard Java library.
-* Support for parameters in PreparedStatement.
-* First steps in recognizing complex materializations. Internally we introduce a concept called a "star table", virtual table composed of real tables joined together via many-to-one relationships. The queries that define materializations and end-user queries are canonized in terms of star tables. Matching (not done yet) will then be a matter of looking for sort, groupBy, project. It is not yet possible to define a star in an Optiq model file.
-* Add section to <a href="HOWTO.md">HOWTO</a> on implementing adapters.
-* Fix data type conversions when creating a clone table in memory.
-* Fix how strings are escaped in JsonBuilder.
-* Test suite now depends on an embedded hsqldb database, so you can run <code>mvn test</code> right after pulling from git. You can instead use a MySQL database if you specify '-Doptiq.test.db=mysql', but you need to manually populate it.
-* Fix a planner issue which occurs when the left and right children of join are the same relational expression, caused by a self-join query.
-* [<a href="https://issues.apache.org/jira/browse/OPTIQ-76">OPTIQ-76</a>]
-  Precedence of the item operator, <code>map[index]</code>; remove the space before '[' when converting parse tree to string.
-* Allow <code>CAST(expression AS ANY)</code>, and fix an issue with the ANY type and NULL values.
-* Handle null timestamps and dates coming out of JDBC adapter.
-* Add <code>jdbcDriver</code> attribute to JDBC schema in model, for drivers that do not auto-register.
-* Allow join rules to match any subclass of JoinRelBase.
-* Push projects, filters and sorts down to MongoDB.
-  (Fixes [<a href="https://issues.apache.org/jira/browse/OPTIQ-57">OPTIQ-57</a>],
-  <a href="https://github.com/julianhyde/optiq/pull/60">pull #60</a> and
-  [<a href="https://issues.apache.org/jira/browse/OPTIQ-72">OPTIQ-72</a>.)
-* Add instructions for loading FoodMart data set into MongoDB, and how to enable tracing.
-* Now runs on JDK 1.8 (still runs on JDK 1.6 and JDK 1.7).
-* Upgrade to junit-4.11 (avoiding the dodgy junit-4.1.12).
-* Upgrade to linq4j-0.1.11.
-
-## <a href="https://github.com/julianhyde/optiq/releases/tag/optiq-parent-0.4.15">0.4.15</a> / 2013-10-14
-
-* Lots of good stuff that this margin is too small to contain. See
-  <a href="REFERENCE.md">SQL language reference</a> and
-  <a href="MODEL.md">JSON model reference</a>.

http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/778a0c51/HOWTO.md
----------------------------------------------------------------------
diff --git a/HOWTO.md b/HOWTO.md
deleted file mode 100644
index 776cf68..0000000
--- a/HOWTO.md
+++ /dev/null
@@ -1,366 +0,0 @@
-# Optiq HOWTO
-
-Here's some miscellaneous documentation about using Optiq and its various
-adapters.
-
-## Building from a source distribution
-
-Prerequisites are maven (3.0.4 or later)
-and Java (JDK 1.6 or later, 1.8 preferred) on your path.
-
-Unpack the source distribution `.tar.gz` or `.zip` file,
-`cd` to the root directory of the unpacked source,
-then build using maven:
-
-```bash
-$ tar xvfz apache-optiq-0.9.0-incubating-source.tar.gz
-$ cd apache-optiq-0.9.0-incubating
-$ mvn install
-```
-
-[Running tests](HOWTO.md#running-tests) describes how to run more or fewer
-tests.
-
-## Building from git
-
-Prerequisites are git, maven (3.0.4 or later)
-and Java (JDK 1.6 or later, 1.8 preferred) on your path.
-
-Create a local copy of the github repository,
-`cd` to its root directory,
-then build using maven:
-
-```bash
-$ git clone git://github.com/apache/incubator-optiq.git
-$ cd incubator-optiq
-$ mvn install
-```
-
-[Running tests](HOWTO.md#running-tests) describes how to run more or fewer
-tests.
-
-## Running tests
-
-The test suite will run by default when you build, unless you specify
-`-DskipTests`:
-
-```bash
-$ mvn -DskipTests clean install
-```
-
-There are other options that control which tests are run, and in what
-environment, as follows.
-
-* `-Doptiq.test.db=DB` (where db is `hsqldb` or `mysql`) allows you
-  to change the JDBC data source for the test suite. Optiq's test
-  suite requires a JDBC data source populated with the foodmart data
-  set.
-   * `hsqldb`, the default, uses an in-memory hsqldb database.
-   * `mysql` uses a MySQL database in `jdbc:mysql://localhost/foodmart`.
-     It is somewhat faster than hsqldb, but you need to populate it
-     manually.
-* `-Doptiq.debug` prints extra debugging information to stdout.
-* `-Doptiq.test.slow` enables tests that take longer to execute. For
-  example, there are tests that create virtual TPC-H and TPC-DS schemas
-  in-memory and run tests from those benchmarks.
-* `-Doptiq.test.mongodb=true` enables tests that run against
-  MongoDB. MongoDB must be installed, running, and
-  [populated with the zips.json data set](HOWTO.md#mongodb-adapter).
-* `-Doptiq.test.splunk=true` enables tests that run against Splunk.
-  Splunk must be installed and running.
-
-## Contributing
-
-We welcome contributions.
-
-If you are planning to make a large contribution, talk to us first! It
-helps to agree on the general approach. Log a
-[JIRA case](https://issues.apache.org/jira/browse/OPTIQ) for your
-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
-install` succeeds. (Run extra tests if your change warrants it.)
-
-Commit your change to your branch, and use a comment that starts with
-the JIRA case number, like this:
-
-```
-[OPTIQ-345] AssertionError in RexToLixTranslator comparing to date literal
-```
-
-If your change had multiple commits, use `git rebase -i master` to
-combine them into a single commit, and to bring your code up to date
-with the latest on the main line.
-
-Then push your commit(s) to github, and create a pull request from
-your branch to the incubator-optiq master branch. Update the JIRA case
-to reference your pull request, and a committer will review your
-changes.
-
-## Tracing
-
-To enable tracing, add the following flags to the java command line:
-
-```
--Doptiq.debug=true -Djava.util.logging.config.file=core/src/test/resources/logging.properties
-```
-
-The first flag causes Optiq to print the Java code it generates
-(to execute queries) to stdout. It is especially useful if you are debugging
-mysterious problems like this:
-
-```
-Exception in thread "main" java.lang.ClassCastException: Integer cannot be cast to Long
-  at Baz$1$1.current(Unknown Source)
-```
-
-The second flag specifies a config file for
-the <a href="http://docs.oracle.com/javase/7/docs/api/java/util/logging/package-summary.html">java.util.logging</a>
-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
-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
-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>.
-
-## MongoDB adapter
-
-First, download and install Optiq,
-and <a href="http://www.mongodb.org/downloads">install MongoDB</a>.
-
-Import MongoDB's zipcode data set into MongoDB:
-
-```bash
-$ curl -o /tmp/zips.json http://media.mongodb.org/zips.json
-$ mongoimport --db test --collection zips --file /tmp/zips.json
-Tue Jun  4 16:24:14.190 check 9 29470
-Tue Jun  4 16:24:14.469 imported 29470 objects
-```
-
-Log into MongoDB to check it's there:
-
-```bash
-$ mongo
-MongoDB shell version: 2.4.3
-connecting to: test
-> db.zips.find().limit(3)
-{ "city" : "ACMAR", "loc" : [ -86.51557, 33.584132 ], "pop" : 6055, "state" : "AL", "_id" : "35004" }
-{ "city" : "ADAMSVILLE", "loc" : [ -86.959727, 33.588437 ], "pop" : 10616, "state" : "AL", "_id" : "35005" }
-{ "city" : "ADGER", "loc" : [ -87.167455, 33.434277 ], "pop" : 3205, "state" : "AL", "_id" : "35006" }
-> exit
-bye
-```
-
-Connect using the <a href="https://github.com/julianhyde/optiq/blob/master/mongodb/src/test/resources/mongo-zips-model.json">mongo-zips-model.json</a> Optiq model:
-```bash
-$ ./sqlline
-sqlline> !connect jdbc:optiq:model=mongodb/target/test-classes/mongo-zips-model.json admin admin
-Connecting to jdbc:optiq:model=mongodb/target/test-classes/mongo-zips-model.json
-Connected to: Optiq (version 0.4.x)
-Driver: Optiq JDBC Driver (version 0.4.x)
-Autocommit status: true
-Transaction isolation: TRANSACTION_REPEATABLE_READ
-sqlline> !tables
-+------------+--------------+-----------------+---------------+
-| TABLE_CAT  | TABLE_SCHEM  |   TABLE_NAME    |  TABLE_TYPE   |
-+------------+--------------+-----------------+---------------+
-| null       | mongo_raw    | zips            | TABLE         |
-| null       | mongo_raw    | system.indexes  | TABLE         |
-| null       | mongo        | ZIPS            | VIEW          |
-| null       | metadata     | COLUMNS         | SYSTEM_TABLE  |
-| null       | metadata     | TABLES          | SYSTEM_TABLE  |
-+------------+--------------+-----------------+---------------+
-sqlline> select count(*) from zips;
-+---------+
-| EXPR$0  |
-+---------+
-| 29467   |
-+---------+
-1 row selected (0.746 seconds)
-sqlline> !quit
-Closing: net.hydromatic.optiq.jdbc.FactoryJdbc41$OptiqConnectionJdbc41
-$
-```
-
-## Splunk adapter
-
-To run the test suite and sample queries against Splunk,
-load Splunk's `tutorialdata.zip` data set as described in
-<a href="http://docs.splunk.com/Documentation/Splunk/6.0.2/PivotTutorial/GetthetutorialdataintoSplunk">the Splunk tutorial</a>.
-
-(This step is optional, but it provides some interesting data for the sample
-queries. It is also necessary if you intend to run the test suite, using
-`-Doptiq.test.splunk=true`.)
-
-## Implementing an adapter
-
-New adapters can be created by implementing `OptiqPrepare.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;
-    }
-
-}
-```
-
-### Testing adapter in Java
-
-The example below shows how SQL query can be submitted to
-`OptiqPrepare` with a custom context (`AdapterContext` in this
-case). Optiq prepares and implements the query execution, using the
-resources provided by the `Context`. `OptiqPrepare.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.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.
-    }
-
-}
-```
-
-## JavaTypeFactory
-
-When Optiq compares `Type` instances, it requires them to be the same
-object. If there are two distinct `Type` instances that refer to the
-same Java type, Optiq may fail to recognize that they match.  It is
-recommended to:
--   Use a single instance of `JavaTypeFactory` within the optiq context
--   Store the `Type` instances so that the same object is always returned for the same `Type`.
-
-## Set up PGP signing keys (for Optiq committers)
-
-Follow instructions at http://www.apache.org/dev/release-signing to
-create a key pair. (On Mac OS X, I did `brew install gpg` and `gpg
---gen-key`.)
-
-Add your public key to the `KEYS` file by following instructions in
-the `KEYS` file.
-
-## Making a snapshot (for Optiq committers)
-
-Before you start:
-* Set up signing keys as described above.
-* Make sure you are using JDK 1.7 (not 1.6 or 1.8).
-* Make sure build and tests succeed with `-Doptiq.test.db=hsqldb` (the default)
-
-```bash
-# set passphrase variable without putting it into shell history
-read GPG_PASSPHRASE
-
-# make sure that there are no junk files in the sandbox
-git clean -x
-
-mvn -Prelease,apache-release -Dgpg.passphrase=${GPG_PASSPHRASE} clean install
-```
-
-When the dry-run has succeeded, change `install` to `deploy`.
-
-## Making a release (for Optiq committers)
-
-Before you start:
-* Set up signing keys as described above.
-* Make sure you are using JDK 1.7 (not 1.6 or 1.8).
-* Make sure build and tests succeed, including with
-  -Doptiq.test.db={mysql,hsqldb}, -Doptiq.test.slow=true,
-  -Doptiq.test.mongodb=true, -Doptiq.test.splunk=true.
-
-```bash
-# Set passphrase variable without putting it into shell history
-read GPG_PASSPHRASE
-
-# Make sure that there are no junk files in the sandbox
-git clean -xn
-
-# Set the version numbers
-mvn -DskipTests -DreleaseVersion=x.y.z-incubating -DdevelopmentVersion=x.y.z+1-incubating-SNAPSHOT -Papache-release,release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare
-
-# Perform the release
-mvn -DskipTests -Papache-release,release -Darguments="-Dgpg.passphrase=${GPG_PASSPHRASE}" clean release:prepare
-
-```
-
-If any of the above steps fail, clean up (see below), fix the problem,
-and start again from the top.
-
-Check the artifacts:
-* Make sure that the source distro (currently there is no binary
-  distro) has a README file (README.md does not count) and that the
-  version in the README is correct
-* The file name must start `apache-optiq-` and include `incubating`.
-* Check PGP, per https://httpd.apache.org/dev/verification.html
-
-Upload the artifacts to a staging area (in this case, your
-people.apache.org home directory):
-
-```bash
-# Rename the files, adding 'apache-' prefix
-cd target
-mkdir apache-optiq-x.y.z-incubating
-for i in optiq-*; do mv $i apache-optiq-x.y.z-incubating/apache-$i; done
-
-# Upload to staging area (your people.apache.org home directory)
-scp -rp apache-optiq-x.y.z-incubating people.apache.org:public_html
-```
-## Cleaning up after a failed release attempt (for Optiq committers)
-
-```
-# Make sure that the tag you are about to generate does not already
-# exist (due to a failed release attempt)
-git tag
-
-# If the tag exists, delete it locally and remotely
-git tag -d optiq-x.y.z-incubating
-git push origin :refs/tags/optiq-x.y.z-incubating
-
-# Remove modified files
-mvn release:clean
-
-# Check whether there are modified files and if so, go back to the
-# original git commit
-git status
-git reset --hard HEAD
-```

http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/778a0c51/INCUBATOR_PROPOSAL.md
----------------------------------------------------------------------
diff --git a/INCUBATOR_PROPOSAL.md b/INCUBATOR_PROPOSAL.md
deleted file mode 100644
index 3f7455d..0000000
--- a/INCUBATOR_PROPOSAL.md
+++ /dev/null
@@ -1,341 +0,0 @@
-# Optiq
-
-## Abstract
-
-Optiq is a framework that allows efficient translation of queries
-involving heterogeneous and federated data.
-
-## Proposal
-
-Optiq is a highly customizable engine for parsing and planning queries
-on data in a wide variety of formats. It allows database-like access,
-and in particular a SQL interface and advanced query optimization, for
-data not residing in a traditional database.
-
-## Background
-
-Databases were traditionally engineered in a monolithic stack,
-providing a data storage format, data processing algorithms, query
-parser, query planner, built-in functions, metadata repository and
-connectivity layer. They innovate in some areas but rarely in all.
-
-Modern data management systems are decomposing that stack
-into separate components, separating data, processing engine,
-metadata, and query language support. They are highly heterogeneous,
-with data in multiple locations and formats, caching and redundant
-data, different workloads, and processing occurring in different
-engines.
-
-Query planning (sometimes called query optimization) has always been
-a key function of a DBMS, because it allows the implementors to
-introduce new query-processing algorithms, and allows data
-administrators to re-organize the data without affecting applications
-built on that data. In a componentized system, the query planner
-integrates the components (data formats, engines, algorithms) without
-introducing unncessary coupling or performance tradeoffs.
-
-But building a query planner is hard; many systems muddle along
-without a planner, and indeed a SQL interface, until the demand from
-their customers is overwhelming.
-
-There is an opportunity to make this process more efficient by
-creating a re-usable framework.
-
-## Rationale
-
-Optiq allows database-like access, and in particular a SQL interface
-and advanced query optimization, for data not residing in a
-traditional database. It is complementary to many current Hadoop and
-NoSQL systems, which have innovative and performant storage and
-runtime systems but lack a SQL interface and intelligent query
-translation.
-
-Optiq is already in use by several projects, including Apache Drill,
-Apache Hive and Cascading Lingual, and commercial products.
-
-Optiq's architecture consists of:
-* An extensible relational algebra.
-* SPIs (service-provider interfaces) for metadata (schemas and
-  tables), planner rules, statistics, cost-estimates, user-defined
-  functions.
-* Built-in sets of rules for logical transformations and common data-sources.
-* Two query planning engines driven by rules, statistics, etc. One
-  engine is cost-based, the other rule-based.
-* Optional SQL parser, validator and translator to relational algebra.
-* Optional JDBC driver.
-
-## Initial Goals
-
-The initial goals are be to move the existing codebase to Apache and
-integrate with the Apache development process. Once this is
-accomplished, we plan for incremental development and releases that
-follow the Apache guidelines.
-
-As we move the code into the org.apache namespace, we will restructure
-components as necessary to allow clients to use just the components of
-Optiq that they need.
-
-A version 1.0 release, including pre-built binaries, will foster wider
-adoption.
-
-## Current Status
-
-Optiq has had over a dozen minor releases over the last 18 months. Its
-core SQL parser and validator, and its planning engine and core rules,
-are mature and robust and are the basis for several production
-systems; but other components and SPIs are still undergoing rapid
-evolution.
-
-### Meritocracy
-
-We plan to invest in supporting a meritocracy. We will discuss the
-requirements in an open forum. We encourage the companies and projects
-using Optiq to discuss their requirements in an open forum and to
-participate in development.  We will encourage and monitor community
-participation so that privileges can be extended to those that
-contribute.
-
-Optiq's pluggable architecture encourages developers to contribute
-extensions such as adapters for data sources, new planning rules, and
-better statistics and cost-estimation functions.  We look forward to
-fostering a rich ecosystem of extensions.
-
-### Community
-
-Building a data management system requires a high degree of
-technical skill, and correspondingly, the community of developers
-directly using Optiq is potentially fairly small, albeit highly
-technical and engaged. But we also expect engagement from members of
-the communities of projects that use Optiq, such as Drill and
-Hive. And we intend to structure Optiq so that it can be used for
-lighter weight applications, such as providing a SQL and JDBC
-interface to a NoSQL system.
-
-### Core Developers
-
-The developers on the initial committers list are all experienced open
-source developers, and are actively using Optiq in their projects.
-
-* Julian Hyde is lead developer of Mondrian, an open source OLAP
-  engine, and an Apache Drill committer.
-* Chris Wensel is lead developer of Cascading, and of Lingual, the SQL
-  interface to Cascading built using Optiq.
-* Jacques Nadeau is lead developer of Apache Drill, which uses Optiq.
-
-In addition, there are several regular contributors whom we hope will
-graduate to committers during the incubation process.
-
-We realize that additional employer diversity is needed, and we will
-work aggressively to recruit developers from additional companies.
-
-### Alignment
-
-Apache, and in particular the ecosystem surrounding Hadoop, contains
-several projects for building data management systems that leverage
-each other's capabilities. Optiq is a natural fit for that ecosystem,
-and will help foster projects meeting new challenges.
-
-Optiq is already used by Apache Hive and Apache Drill; Optiq embeds
-Apache Spark as an optional engine; we are in discussion with Apache
-Phoenix about integrating JDBC and query planning.
-
-## Known Risks
-
-### Orphaned Products
-
-Optiq is already a key component in three independent projects, each
-backed by a different company, so the risk of being orphaned is
-relatively low. We plan to mitigate this risk by recruiting additional
-committers, and promoting Optiq's adoption as a framework by other
-projects.
-
-### Inexperience with Open Source
-
-The initial committers are all Apache members, some of whom have
-several years in the Apache Hadoop community. The founder of the
-project, Julian Hyde, has been a founder and key developer in open
-source projects for over ten years.
-
-### Homogenous Developers
-
-The initial committers are employed by a number of companies,
-including Concurrent, Hortonworks, MapR Technologies and Salesforce.com.
-We are committed to recruiting additional committers from outside these
-companies.
-
-### Reliance on Salaried Developers
-
-Like most open source projects, Optiq receives substantial support
-from salaried developers. This is to be expected given that it is a
-highly technical framework. However, they are all passionate about the
-project, and we are confident that the project will continue even if
-no salaried developers contribute to the project. As a framework, the
-project encourages the involvement of members of other projects, and
-of academic researchers. We are committed to recruiting additional
-committers including non-salaried developers.
-
-### Relationships with Other Apache Products
-
-As mentioned in the Alignment section, Optiq is being used by
-<a href="http://hive.apache.org">Apache Hive</a> and
-<a href="http://incubator.apache.org/drill">Apache Drill</a>,
-and has adapters for
-<a href="http://phoenix.incubator.apache.org">Apache Phoenix</a>
-and
-<a href="http://spark.apache.org">Apache Spark</a>.
-Optiq often operates on data in a Hadoop environment, so collaboration
-with other Hadoop projects is desirable and highly likely.
-
-Unsurprisingly there is some overlap in capabilities between Optiq and
-other Apache projects. Several projects that are databases or
-database-like have query-planning capabilities. These include Hive,
-Drill, Phoenix, Spark,
-<a href="http://db.apache.org/derby">Apache Derby</a>,
-<a href="http://pig.apache.org">Apache Pig</a>,
-<a href="http://jena.apache.org">Apache Jena</a> and
-<a href="http://tajo.apache.org">Apache Tajo</a>.
-Optiq’s query planner is extensible at run time, and does
-not have a preferred runtime engine on which to execute compiled
-queries. These capabilities, and the large corpus of pre-built rules,
-are what allow Optiq to be embedded in other projects.
-
-Several other Apache projects access third-party data sources,
-including Hive, Pig, Drill, Spark and
-<a href="http://metamodel.incubator.apache.org">Apache MetaModel</a>.
-Optiq allows users to optimize access to third-party data sources by
-writing rules to push processing down to the data source, and provide
-a cost model to choose the optimal location for processing. That said,
-maintaining a library of adapters is burdensome, and so it would make
-sense to collaborate with other projects on adapter libraries, and
-re-use libraries where possible.
-
-Optiq supports several front ends for submitting queries. The most
-popular is SQL, with driver connectivity via JDBC (and ODBC
-planned). Other Apache projects with a SQL parser include Hive, Spark,
-Phoenix, Derby, Tajo. Drill uses Optiq’s parser and JDBC stack; both
-Phoenix and Drill have expressed interest in collaborating on JDBC and
-ODBC. Optiq’s Linq4j API is similar to the fluent query-builder APIs
-in Spark and MetaModel. Use of a front end is not required; for
-instance, Hive integrates with Optiq by directly building a graph of
-`RelNode` objects.
-
-### An Excessive Fascination with the Apache Brand
-
-Optiq solves a real problem, as evidenced by its take-up by other
-projects. This proposal is not for the purpose of generating
-publicity. Rather, the primary benefits to joining Apache are those
-outlined in the Rationale section.
-
-## Documentation
-
-Additional documentation for Optiq may be found on its github site:
-* Overview - https://github.com/julianhyde/optiq/blob/master/README.md
-* Tutorial - https://github.com/julianhyde/optiq-csv/blob/master/TUTORIAL.md
-* HOWTO - https://github.com/julianhyde/optiq/blob/master/HOWTO.md
-* Reference guide -  https://github.com/julianhyde/optiq/blob/master/REFERENCE.md
-
-Presentation:
-* <a href="https://github.com/julianhyde/share/blob/master/slides/optiq-richrelevance-2013.pdf?raw=true">SQL on Big Data using Optiq</a>
-
-## Initial Source
-
-The initial code codebase resides in three projects, all hosted on github:
-* https://github.com/julianhyde/optiq
-* https://github.com/julianhyde/optiq-csv
-* https://github.com/julianhyde/linq4j
-
-### Source and Intellectual Property Submission Plan
-
-The initial codebase is already distributed under the Apache 2.0
-License. The owners of the IP have indicated willingness to sign the
-SGA.
-
-## External Dependencies
-
-Optiq and Linq4j have the following external dependencies.
-
-* Java 1.6, 1.7 or 1.8
-* Apache Maven, Commons
-* JavaCC (BSD license)
-* Sqlline 1.1.6 (BSD license)
-* Junit 4.11 (EPL)
-* Janino (BSD license)
-* Guava (Apache 2.0 license)
-* Eigenbase-resgen, eigenbase-xom, eigenbase-properties (Apache 2.0 license)
-
-Some of Optiq's adapters (optiq-csv, optiq-mongodb, optiq-spark,
-optiq-splunk) are currently developed alongside core Optiq, and have
-the following additional dependencies:
-
-* Open CSV 2.3 (Apache 2.0 license)
-* Apache Incubator Spark
-* Mongo Java driver (Apache 2.0 license)
-
-Upon acceptance to the incubator, we would begin a thorough analysis
-of all transitive dependencies to verify this information and
-introduce license checking into the build and release process by
-integrating with Apache Rat.
-
-## Cryptography
-
-Optiq will eventually support encryption on the wire. This is not one
-of the initial goals, and we do not expect Optiq to be a controlled
-export item due to the use of encryption.
-
-## Required Resources
-
-### Mailing Lists
-
-* private@optiq.incubator.apache.org
-* dev@optiq.incubator.apache.org (will be migrated from optiq-dev@googlegroups.com)
-* commits@optiq.incubator.apache.org
-
-### Source control
-
-The Optiq team would like to use git for source control, due to our
-current use of git/github. We request a writeable git repo
-git://git.apache.org/incubator-optiq, and mirroring to be set up to
-github through INFRA.
-
-### Issue Tracking
-
-Optiq currently uses the github issue tracking system associated with
-its github repo: https://github.com/julianhyde/optiq/issues. We will
-migrate to the Apache JIRA:
-http://issues.apache.org/jira/browse/OPTIQ.
-
-## Initial Committers
-
-Julian Hyde (jhyde at apache dot org)
-Jacques Nadeau (jacques at apache dot org)
-James R. Taylor (jamestaylor at apache dot org)
-Chris Wensel (cwensel at apache dot org)
-
-## Affiliations
-
-The initial committers are employees of Concurrent, Hortonworks, MapR
-and Salesforce.com.
-
-* Julian Hyde (Hortonworks)
-* Jacques Nadeau (MapR Technologies)
-* James R. Taylor (Salesforce.com)
-* Chris Wensel (Concurrent)
-
-## Sponsors
-
-### Champion
-
-* Ashutosh Chauhan (hashutosh at apache dot org)
-
-### Nominated Mentors
-
-* Ted Dunning (tdunning at apache dot org) – Chief Application Architect at
-  MapR Technologies; committer for Lucene, Mahout and ZooKeeper.
-* Alan Gates (gates at apache dot org) - Architect at Hortonworks;
-  committer for Pig, Hive and others.
-* Steven Noels (stevenn at apache dot org) - Chief Technical Officer at NGDATA;
-  committer for Cocoon and Forrest, mentor for Phoenix.
-
-### Sponsoring Entity
-
-The Apache Incubator.

http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/778a0c51/MODEL.md
----------------------------------------------------------------------
diff --git a/MODEL.md b/MODEL.md
deleted file mode 100644
index e88d8d2..0000000
--- a/MODEL.md
+++ /dev/null
@@ -1,256 +0,0 @@
-# Optiq JSON model reference
-
-## Elements
-
-### Root
-
-```json
-{
-  version: '1.0',
-  defaultSchema: 'mongo',
-  schemas: [ Schema... ]
-}
-```
-
-`version` (required string) must have value `1.0`.
-
-`defaultSchema` (optional string). If specified, it is
-the name (case-sensitive) of a schema defined in this model, and will
-become the default schema for connections to Optiq that use this model.
-
-`schemas` (optional list of <a href="#schema">Schema</a> elements).
-
-### Schema
-
-Occurs within `root.schemas`.
-
-```json
-{
-  name: 'foodmart',
-  path: ['lib'],
-  cache: true,
-  materializations: [ Materialization... ]
-}
-```
-
-`name` (required string) is the name of the schema.
-
-`type` (optional string, default `map`) indicates sub-type. Values are:
-* `map` for <a href="#map-schema">Map Schema</a>
-* `custom` for <a href="#custom-schema">Custom Schema</a>
-* `jdbc` for <a href="#jdbc-schema">JDBC Schema</a>
-
-`path` (optional list) is the SQL path that is used to
-resolve functions used in this schema. If specified it must be a list,
-and each element of the list must be either a string or a list of
-strings. For example,
-
-```json
-  path: [ ['usr', 'lib'], 'lib' ]
-```
-
-declares a path with two elements: the schema '/usr/lib' and the
-schema '/lib'. Most schemas are at the top level, so you can use a
-string.
-
-`materializations` (optional list of
-<a href="#materialization">Materialization</a>) defines the tables
-in this schema that are materializations of queries.
-
-`cache` (optional boolean, default true) tells Optiq whether to
-cache metadata (tables, functions and sub-schemas) generated
-by this schema.
-
-* If `false`, Optiq will go back to the schema each time it needs
-  metadata, for example, each time it needs a list of tables in order to
-  validate a query against the schema.
-
-* If `true`, Optiq will cache the metadata the first time it reads
-  it. This can lead to better performance, especially if name-matching is
-  case-insensitive.
-
-However, it also leads to the problem of cache staleness.
-A particular schema implementation can override the
-`Schema.contentsHaveChangedSince` method to tell Optiq
-when it should consider its cache to be out of date.
-
-Tables, functions and sub-schemas explicitly created in a schema are
-not affected by this caching mechanism. They always appear in the schema
-immediately, and are never flushed.
-
-### Map Schema
-
-Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
-
-```json
-{
-  name: 'foodmart',
-  type: 'map',
-  tables: [ Table... ],
-  functions: [ Function... ]
-}
-```
-
-`name`, `type`, `path`, `cache`, `materializations` inherited from <a href="#schema">Schema</a>.
-
-`tables` (optional list of <a href="#table">Table</a> elements)
-defines the tables in this schema.
-
-`functions` (optional list of <a href="#function">Function</a> elements)
-defines the functions in this schema.
-
-### Custom Schema
-
-Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
-
-```json
-{
-  name: 'mongo',
-  type: 'custom',
-  factory: 'net.hydromatic.optiq.impl.mongodb.MongoSchemaFactory',
-  operand: {
-    host: 'localhost',
-    database: 'test'
-  }
-}
-```
-
-`name`, `type`, `path`, `cache`, `materializations` inherited from <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`
-and have a public default constructor.
-
-`operand` (optional map) contains attributes to be passed to the
-factory.
-
-### JDBC Schema
-
-Like base class <a href="#schema">Schema</a>, occurs within `root.schemas`.
-
-```json
-{
-  name: 'foodmart',
-  type: 'jdbc',
-  jdbcDriver: TODO,
-  jdbcUrl: TODO,
-  jdbcUser: TODO,
-  jdbcPassword: TODO,
-  jdbcCatalog: TODO,
-  jdbcSchema: TODO
-}
-```
-
-`name`, `type`, `path`, `cache`, `materializations` inherited from <a href="#schema">Schema</a>.
-
-`jdbcDriver` (optional string) is TODO.
-
-`jdbcUrl` (optional string) is TODO.
-
-`jdbcUser` (optional string) is TODO.
-
-`jdbcPassword` (optional string) is TODO.
-
-`jdbcCatalog` (optional string) is TODO.
-
-`jdbcSchema` (optional string) is TODO.
-
-### Materialization
-
-Occurs within `root.schemas.materializations`.
-
-```json
-TODO
-```
-
-`view` (optional string) TODO
-
-`table` (optional string) TODO
-
-`sql` (optional string) TODO
-
-### Table
-
-Occurs within `root.schemas.tables`.
-
-```json
-{
-  name: 'sales_fact',
-  columns: [ Column... ]
-}
-```
-
-`name` (required string) is the name of this table. Must be unique within the schema.
-
-`type` (optional string, default `custom`) indicates sub-type. Values are:
-* `custom` for <a href="#custom-table">Custom Table</a>
-* `view` for <a href="#view">View</a>
-
-`columns` (optional list of <a href="#column">Column</a> elements)
-
-### View
-
-Like base class <a href="#table">Table</a>, occurs within `root.schemas.tables`.
-
-```json
-{
-  name: 'female_emps',
-  type: 'view',
-  sql: "select * from emps where gender = 'F'"
-}
-```
-
-`name`, `type`, `columns` inherited from <a href="#table">Table</a>.
-
-`sql` (required string) is the SQL definition of the view.
-
-`path` (optional list) is the SQL path to resolve the query. If not
-specified, defaults to the current schema.
-
-### Custom Table
-
-Like base class <a href="#table">Table</a>, occurs within `root.schemas.tables`.
-
-```json
-{
-  name: 'female_emps',
-  type: 'custom',
-  factory: 'TODO',
-  operand: {
-    todo: 'TODO'
-  }
-}
-```
-
-`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`
-and have a public default constructor.
-
-`operand` (optional map) contains attributes to be passed to the
-factory.
-
-### Column
-
-Occurs within `root.schemas.tables.columns`.
-
-```json
-TODO
-```
-
-`name` (required string) is the name of this column.
-
-### Function
-
-Occurs within `root.schemas.functions`.
-
-```json
-TODO
-```
-
-`name` (required string) is the name of this function.
-
-`className` (required string) is the name of the class that implements this function.
-
-`path` (optional list of string) is the path for resolving this function.

http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/778a0c51/README
----------------------------------------------------------------------
diff --git a/README b/README
index bacc4ad..bd2e686 100644
--- a/README
+++ b/README
@@ -2,14 +2,14 @@ Apache Optiq release 0.9.0 (incubating)
 
 This is a source or binary distribution of Apache Optiq.
 
-Changes since the previous release are described in the HISTORY.md
+Changes since the previous release are described in the doc/HISTORY.md
 file.
 
 The LICENSE and NOTICE files contain license information.
 
 If this is a source distribution, you can find instructions how to
 build the release in the "Building from a source release" section in
-HOWTO.md.
+doc/HOWTO.md.
 
 README.md contains examples of running Optiq.
 

http://git-wip-us.apache.org/repos/asf/incubator-optiq/blob/778a0c51/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 2d2bc0d..7adaa5a 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ Apache Optiq is a dynamic data management framework.
 
 To run Apache Optiq, you can either
 [download a release](http://www.apache.org/dyn/closer.cgi/incubator/optiq)
-or [build from the source code](HOWTO.md#building-from-a-source-distribution).
+or [build from the source code](doc/HOWTO.md#building-from-a-source-distribution).
 
 ## Example
 
@@ -135,7 +135,7 @@ your own adapter.
 See the <a href="https://github.com/julianhyde/optiq-csv/blob/master/TUTORIAL.md">optiq-csv tutorial</a>
 for information on using optiq-csv and writing adapters.
 
-See the <a href="HOWTO.md">HOWTO</a> for more information about using other
+See the <a href="doc/HOWTO.md">HOWTO</a> for more information about using other
 adapters, and about using Optiq in general.
 
 ## Status
@@ -149,7 +149,7 @@ The following features are complete.
 * <a href="https://github.com/julianhyde/linq4j">Linq4j</a> front-end
 * SQL features: SELECT, FROM (including JOIN syntax), WHERE, GROUP BY (and aggregate functions including COUNT(DISTINCT ...)), HAVING, ORDER BY (including NULLS FIRST/LAST), set operations (UNION, INTERSECT, MINUS), sub-queries (including correlated sub-queries), windowed aggregates, LIMIT (syntax as <a href="http://www.postgresql.org/docs/8.4/static/sql-select.html#SQL-LIMIT">Postgres</a>)
 
-For more details, see the <a href="REFERENCE.md">Reference guide</a>.
+For more details, see the <a href="doc/REFERENCE.md">Reference guide</a>.
 
 ### Drivers
 
@@ -176,10 +176,10 @@ For more details, see the <a href="REFERENCE.md">Reference guide</a>.
 * Source code: http://github.com/julianhyde/optiq
 * Issues: <a href="https://issues.apache.org/jira/browse/OPTIQ">Apache JIRA</a>
 * Developers list: <a href="mailto:dev@optiq.incubator.apache.org">dev at optiq.incubator.apache.org</a> (<a href="http://mail-archives.apache.org/mod_mbox/incubator-optiq-dev/">archive</a>, <a href="mailto:dev-subscribe@optiq.incubator.apache.org">subscribe</a>)
-* <a href="HOWTO.md">HOWTO</a>
-* <a href="MODEL.md">JSON model</a>
-* <a href="REFERENCE.md">Reference guide</a>
-* <a href="HISTORY.md">Release notes and history</a>
+* <a href="doc/HOWTO.md">HOWTO</a>
+* <a href="doc/MODEL.md">JSON model</a>
+* <a href="doc/REFERENCE.md">Reference guide</a>
+* <a href="doc/HISTORY.md">Release notes and history</a>
 
 ### Pre-Apache resources