Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
DRILL-1402: Add check-style rules for trailing space, TABs and blocks without braces

  1. … 439 more files in changeset.
DRILL-634: Cleanup/organize Java imports and trailing whitespaces from Drill code

  1. … 762 more files in changeset.
DRILL-1328: Support table statistics - Part 2

Add support for avg row-width and major type statistics.

Parallelize the ANALYZE implementation and stats UDF implementation to improve stats collection performance.

Update/fix rowcount, selectivity and ndv computations to improve plan costing.

Add options for configuring collection/usage of statistics.

Add new APIs and implementation for stats writer (as a precursor to Drill Metastore APIs).

Fix several stats/costing related issues identified while running TPC-H nad TPC-DS queries.

Add support for CPU sampling and nested scalar columns.

Add more testcases for collection and usage of statistics and fix remaining unit/functional test failures.

Thanks to Venki Korukanti (@vkorukanti) for the description below (modified to account for new changes). He graciously agreed to rebase the patch to latest master, fixed few issues and added few tests.

FUNCS: Statistics functions as UDFs:

Separate

Currently using FieldReader to ensure consistent output type so that Unpivot doesn't get confused. All stats columns should be Nullable, so that stats functions can return NULL when N/A.

* custom versions of "count" that always return BigInt

* HyperLogLog based NDV that returns BigInt that works only on VarChars

* HyperLogLog with binary output that only works on VarChars

OPS: Updated protobufs for new ops

OPS: Implemented StatisticsMerge

OPS: Implemented StatisticsUnpivot

ANALYZE: AnalyzeTable functionality

* JavaCC syntax more-or-less copied from LucidDB.

* (Basic) AnalyzePrule: DrillAnalyzeRel -> UnpivotPrel StatsMergePrel FilterPrel(for sampling) StatsAggPrel ScanPrel

ANALYZE: Add getMetadataTable() to AbstractSchema

USAGE: Change field access in QueryWrapper

USAGE: Add getDrillTable() to DrillScanRelBase and ScanPrel

* since ScanPrel does not inherit from DrillScanRelBase, this requires adding a DrillTable to the constructor

* This is done so that a custom ReflectiveRelMetadataProvider can access the DrillTable associated with Logical/Physical scans.

USAGE: Attach DrillStatsTable to DrillTable.

* DrillStatsTable represents the data scanned from a corresponding ".stats.drill" table

* In order to avoid doing query execution right after the ".stats.drill" table is found, metadata is not actually collected until the MaterializationVisitor is used.

** Currently, the metadata source must be a string (so that a SQL query can be created). Doing this with a table is probably more complicated.

** Query is set up to extract only the most recent statistics results for each column.

closes #729

    • -0
    • +69
    ./StatisticsMerge.java
  1. … 141 more files in changeset.
DRILL-1329: External sort memory fixes

  1. … 38 more files in changeset.
DRILL-1078: Added metrics to unordered receiver (+ renaming) and merging receiver.

  1. … 5 more files in changeset.
DRILL-1055: Add ProducerConsumer operator to scans

This can be disabled. The queue size is configurable

    • -0
    • +58
    ./ProducerConsumer.java
  1. … 13 more files in changeset.
DRILL-1069: Rename RandomReceiver to UnorderedRecevier.

    • -0
    • +64
    ./UnorderedReceiver.java
  1. … 7 more files in changeset.
DRILL-1022: Increase default min hash table size and allow setting min/max size for hash table.

  1. … 8 more files in changeset.
DRILL-836: [addendum] Drill needs to return complex types (e.g., map and array) as a JSON string

* This contains additional changes to the original patch which was merged.

+ Renamed "flatten" to "complex-to-json"

+ With the new patch, we return VARCHAR instead of VARBINARY.

+ Added test case.

+ Minor code re-factoring.

    • -0
    • +59
    ./ComplexToJson.java
  1. … 37 more files in changeset.
Merge fixes.

  1. … 19 more files in changeset.
DRILL-933: Remove old physical operator cost & size concepts, add automatic size-based parallelization

  1. … 81 more files in changeset.
DRILL-836: Drill needs to return complex types (e.g., map and array) as a JSON string

  1. … 17 more files in changeset.
DRILL-968: Use checkstyle plugin to prevent inadvertent use of shaded Guava classes

+ Disallow non-static '*' imports in handwritten code.

+ Updated the current code to be in compliance.

+ Run 'rat' plugin in 'validate' phase.

  1. … 102 more files in changeset.
DRILL-600: Support planning for Union-All. Added infrastructure for planning Union-Distinct (not enabled yet).

  1. … 18 more files in changeset.
Remove references to jcommander's copy of Guava's Lists class.

  1. … 31 more files in changeset.
status changes

  1. … 62 more files in changeset.
Fix bug in MergeJoin when there are repeating values across left batches. Ensure join type is specified. Add join type to some physical plan in unit test case.

Re-enable a testcase for MergeJoin. +

  1. … 6 more files in changeset.
DRILL-707 : Replace ValueAllocator with allocateNewSafe() in SVR. WIP.

remove valueallocator in SVR.

SV for Limit OP.

Selection vector remover. More WIP.

code clean up.

reverse rule change.

  1. … 5 more files in changeset.
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.

  1. … 48 more files in changeset.
DRILL-679: Support create table as query (CTAS).

  1. … 47 more files in changeset.
DRILL-578: Performance fixes in Hash Join.

Includes a few minor fixes when hash join receives empty batches on build / probe side

  1. … 6 more files in changeset.
DRILL-557: Fix mismatch between Jackson annotations and field names.

  1. … 12 more files in changeset.
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.

    • -0
    • +93
    ./HashToMergeExchange.java
  1. … 48 more files in changeset.
fix merge join to handle case where right batch has zero records

  1. … 4 more files in changeset.
Fix the duplicate field names in join operator. Work in progress for column star.

  1. … 3 more files in changeset.
DRILL-335: Implement Hash Aggregation

1. Implementation of the hash aggregation execution operator - this has two main parts: the HashAggTemplate and the HashAggBatch.

2. Implementation of a hash table which is used by the hash aggregation. The hash table hash two main parts: the HashTableTemplate and the ChainedHashTable. The hash table internally uses the notion of 'BatchHolder' to keep track of all keys that can fit within one batch of 64K values. New BatchHolder objects are created as needed. Each BatchHolder has its own vector container. The HashAggregate also has a similar structure and it keeps track of the workspace variables.

(NOTE: An initial design document for the hash aggregation and hash table was already attached with Drill-335. The document has not yet been updated with the latest implementation ... will try to do that in the near future).

3. Jinfeng's changes to use workspace vectors in the generated code for aggregate functions (previously, for streaming aggregate we only needed to maintain workspace variable for 1 running group; however for hash aggregate we need to maintain it for all groups).

4. Fix for Drill-318: because of #3 above, the previous fix for Drill-318 is not valid anymore. I modified the template generation code for the aggregate functions such that they conform to the new infrastructure.

5. The original AggTemplate, AggBatch and Aggregator classes have been moved to corresponding StreamingAggTemplate, StreamingAggBatch and StreamingAggregator in order to differentiate it from hash aggregation. These appear as new files but the code there has not changed.

I have run several tests manually as part of TestHashAggr...these tests use TPC-H data and in particular a relatively large 'Orders' table. However, I have not yet packaged the tests to run as part of JUnit since the location and size of the parquet files needs to be figured out. I will continue to work on that.

    • -0
    • +119
    ./HashAggregate.java
  1. … 48 more files in changeset.
DRILL-450: Add exchange rules, move from BasicOptimizer to Optiq

  1. … 120 more files in changeset.
DRILL-505: Hash Join

Support for left outer, right outer and full joins

Support for multiple join conditions

Add following tests

- Multiple condition join

- Join on JSON scan

- Multi batch join

- Simple equality join

    • -0
    • +143
    ./HashJoinPOP.java
  1. … 19 more files in changeset.
DRILL-386: Implement External Sort operator

  1. … 38 more files in changeset.
DRILL-385: Implement Top-N sort operator

  1. … 19 more files in changeset.