DRILL-576: Add costing
- new plans for joins and aggregations, including distributions.
- Utilize GroupScan getSize() for costing
- Add cleanup() methods to MergeJoinBatch and HashJoinBatch.
- Don't match hash aggr rule if number of grouping cols is 0.
- Fix initialization of maxOccupiedIndex in HashAggr and HashTable.
- Fix less-than comparison for cost when row counts are the same.
- Improve fragment identification for better debugging.
DRILL-656: Fix for test case failure in TestPoolChunkTrim
DRILL-654: Fix for MaterializedField.getAsSchemaPath()
DRILL-655: Miscellaneous fixes for SchemaPath

 - Fixed equals() and hashCode().
 - Made PathSegment immutable outside of package.
 - Made ArraySegment and NameSegment final.
DRILL-626: Project push down into HBase scan
DRILL-664: Improve Rpc error message display
DRILL-633: Fix toString() for DrillFuncHolder and few other types.

 - Added o.a.d.common.types.Types.toString(MajorType) method to convert a MajorType to string without the line breaks.
 - Log a trace message with all registered Drill functions.
DRILL-682: Improve HBase storage engine test execution
DRILL-619: Implement Decimal functions abs ceil floor round truncate divide modulo Fix resolver type precedence Fix bug in multiplication of large decimals Add tests

Added following misc functions
concat
length
to_char
to_number

Aggregate functions for decimal
DRILL-601: Support for 'Show files' command
Cleanup DateUtility to use time zone list once
DRILL-679: Support create table as query (CTAS).
DRILL-675: Views created in dfs (with no workspace subschema) schema are not found when queried.
DRILL-679: Support create table as query (CTAS) (contd.).

Continuation to e19606593f3173d8f82ca3074186e9ca7a960ce2.
Refactoring and align the writer interfaces similar to reader interfaces at the storage and file format level.
DRILL-674: Consider the view/table identifier given in CREATE VIEW/TABLE statements.
Fix hash join functions for variable types to use the correct buffer.
Join order: Use parquet row count as the basis of scan cost. Transform select count(*)/count(columnName) into DirectGroupScan when possible.

Nullable return type for extract function.

Fix a bug in DrillProjectRule. Fix bug in ProjectPrule, set Direction for RelCollation trait.

Set nullable properly for extract function's  return type and 'any' type in view DDL or table field lists.
In Logical rule, use child's trait when convert child to logical.  Propagate traits from child to parent, for Project/Filter etc.

Clean up in TestJdbcDistQuery test case.
DRILL-687: Support selecting Date, Timestamp, Decimal data types from Hive into Drill

Add unit test
DRILL-688: Fix timestamp constant serialization