Clone Tools
  • last updated 11 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
DRILL-4782 / DRILL-7139: Fix DATE_ADD and TO_TIME functions

- cast function for the day interval changed to round milliseconds to complete days

- ToDateTypeFunctions#toTime now returning milliseconds of day

- updated the way how DayInterval subtracts and adds, to follow the cast function logic

UT core updates:

- added vectorValue function to the queryBuilder to simplify retrieving value of the vector

- refactored singleton query result functions at queryBuilder

    • -0
    • +95
    ./fn/impl/TestIntervalDayFunctions.java
  1. … 6 more files in changeset.
DRILL-7096: Develop vector for canonical Map<K,V>

- Added new type DICT;

- Created value vectors for the type for single and repeated modes;

- Implemented corresponding FieldReaders and FieldWriters;

- Made changes in EvaluationVisitor to be able to read values from the map by key;

- Made changes to DrillParquetGroupConverter to be able to read Parquet's MAP type;

- Added an option `store.parquet.reader.enable_map_support` to disable reading MAP type as DICT from Parquet files;

- Updated AvroRecordReader to use new DICT type for Avro's MAP;

- Added support of the new type to ParquetRecordWriter.

  1. … 108 more files in changeset.
DRILL-6533: Allow using literal values in functions which expect FieldReader instead of ValueHolder

closes #1617

  1. … 2 more files in changeset.
DRILL-6810: Disable NULL_IF_NULL NullHandling for functions with ComplexWriter closes #1509

  1. … 16 more files in changeset.
DRILL-3988: Expose Drill built-in functions & UDFs in a system table (#1483)

This commit exposes available SQL functions in Drill and also detects UDFs that have been dynamically loaded into Drill.

An example is shown below for 2 UDFs dynamically loaded into the cluster, along side the existing built-in functions that come with Drill.

```

0: jdbc:drill:schema=sys> select source, count(*) as functionCount from sys.functions group by source;

+-----------------------------------------+----------------+

| source | functionCount |

+-----------------------------------------+----------------+

| built-in | 2704 |

| simple-drill-function-1.0-SNAPSHOT.jar | 12 |

| drill-url-tools-1.0.jar | 1 |

+-----------------------------------------+----------------+

3 rows selected (0.209 seconds)

```

The system table exposes information as shown. The UDF is initialized, making the `returnType` available.

The `random(FLOAT8-REQUIRED,FLOAT8-REQUIRED)` function is an example of a UDF that has overloaded arguments (see `signature`).

The `url_parse(VARCHAR-REQUIRED)` function is another example of an initialized UDF.

Rest are built-in functions that meet the query's filter criteria.

```

0: jdbc:drill:schema=sys> select * from sys.functions where name like 'random' or name like '%url%';

+-------------+----------------------------------+-------------+-----------------------------------------+

| name | signature | returnType | source |

+-------------+----------------------------------+-------------+-----------------------------------------+

| parse_url | VARCHAR-REQUIRED | LATE | built-in |

| random | | FLOAT8 | built-in |

| random | FLOAT8-REQUIRED,FLOAT8-REQUIRED | FLOAT8 | simple-drill-function-1.0-SNAPSHOT.jar |

| url_decode | VARCHAR-REQUIRED | VARCHAR | built-in |

| url_encode | VARCHAR-REQUIRED | VARCHAR | built-in |

| url_parse | VARCHAR-REQUIRED | LATE | drill-url-tools-1.0.jar |

+-------------+----------------------------------+-------------+-----------------------------------------+

6 rows selected (0.619 seconds)

```

  1. … 9 more files in changeset.
DRILL-6762: Fix dynamic UDFs versioning issue

1. Added UndefinedVersionDelegatingStore to serve as versioned wrapper for those stores that do not support versioning.

2. Aligned remote and local function registries version type. Type will be represented as int since ZK version is returned as int.

3. Added NOT_AVAILABLE and UNDEFINED versions to DataChangeVersion holder to indicate proper registry state.

4. Added additional trace logging.

5. Minor refactoring and clean up.

closes #1484

  1. … 21 more files in changeset.
DRILL-6717: lower and upper functions not works with national characters

closes #1450

  1. … 2 more files in changeset.
DRILL-6422: Replace guava imports with shaded ones

  1. … 982 more files in changeset.
DRILL-6656: Disallow extra semicolons and multiple statements on the same line.

closes #1415

  1. … 144 more files in changeset.
DRILL-6438: Remove excess logging form the tests. - Removed usages of System.out and System.err from the test and replaced with loggers

closes #1284

  1. … 89 more files in changeset.
DRILL-6272: Refactor dynamic UDFs and function initializer tests to generate needed binary and source jars at runtime

close apache/drill#1225

    • -29
    • +25
    ./fn/FunctionInitializerTest.java
  1. … 29 more files in changeset.
DRILL-6361: Revised typeOf() function versions

Added more unit tests.

Updated to handle VARDECIMAL

The VARDECIMAL type was recently added to Drill. Added support for this type. The sqlTypeOf() function now returns DECIMAL(p, s) for precision p, scale s.

closes #1242

    • -0
    • +197
    ./fn/impl/TestTypeFns.java
  1. … 3 more files in changeset.
DRILL-6320: Fixed license headers.

closes #1207

    • -1
    • +1
    ./fn/impl/TestSimpleRepeatedFunctions.java
  1. … 2060 more files in changeset.
DRILL-6249: Adding more unit testing documentation.

close apache/drill#1251

  1. … 29 more files in changeset.
DRILL-6208: Fix FunctionInitializerTest#testConcurrentFunctionBodyLoad to use Mockito instead of JMockit

closes #1149

    • -16
    • +17
    ./fn/FunctionInitializerTest.java
  1. … 1 more file in changeset.
DRILL-5730: Mock testing improvements and interface improvements

closes #1045

  1. … 222 more files in changeset.
DRILL-5879: Improved SQL Pattern Contains Performance

close apache/drill#1072

    • -10
    • +102
    ./fn/impl/TestSqlPatterns.java
  1. … 1 more file in changeset.
DRILL-5989: Categories some tests to speed up smoke tests. Made travis run tests.

closes #1053

  1. … 31 more files in changeset.
DRILL-5783, DRILL-5841, DRILL-5894: Rationalize test temp directories

This change includes:

DRILL-5783:

- A unit test is created for the priority queue in the TopN operator.

- The code generation classes passed around a completely unused function registry reference in some places so it is removed.

- The priority queue had unused parameters for some of its methods so it is removed.

DRILL-5841:

- Created standardized temp directory classes DirTestWatcher, SubDirTestWatcher, and BaseDirTestWatcher. And updated all unit tests to use them.

DRILL-5894:

- Removed the dfs_test storage plugin for tests and replaced it with the already existing dfs storage plugin.

Misc:

- General code cleanup.

- Removed unnecessary use of String.format in the tests.

This closes #984

    • -3
    • +11
    ./TestSchemaPathMaterialization.java
  1. … 361 more files in changeset.
DRILL-5899: Simple pattern matchers can work with DrillBuf directly

closes #1015

    • -474
    • +255
    ./fn/impl/TestSqlPatterns.java
    • -0
    • +149
    ./fn/impl/TestStringFunctions.java
  1. … 9 more files in changeset.
DRILL-5772: Enable UTF-8 support in query string by default

1. Bump up Drill Calcite version to in include CALCITE-2014 changes.

2. Add saffron.properties file to the Drill conf folder.

3. Add appopriate unit tests.

closes #936

  1. … 6 more files in changeset.
DRILL-5752 this change includes:

1. Increased test parallelism and fixed associated bugs

2. Added test categories and categorized tests appropriately

- Don't exclude anything by default

- Increase test timeout

- Fixed flakey test

closes #940

    • -0
    • +3
    ./fn/impl/TestSimpleRepeatedFunctions.java
  1. … 260 more files in changeset.
DRILL-5697: Improve performance of filter operator for pattern matching

closes #907

    • -0
    • +674
    ./fn/impl/TestSqlPatterns.java
    • -0
    • +961
    ./fn/impl/TestStringFunctions.java
  1. … 10 more files in changeset.
DRILL-4264: Allow field names to include dots

    • -1
    • +20
    ./TestSchemaPathMaterialization.java
  1. … 98 more files in changeset.
DRILL-5533: Fix flag assignment in FunctionInitializer.checkInit() method

Changes:

1. Fixed DCL in FunctionInitializer.checkInit() method (update flag parameter when function body is loaded).

2. Fixed ImportGrabber.getImports() method to return the list with imports.

3. Added unit tests for FunctionInitializer.

4. Minor refactoring (renamed methods, added javadoc).

closes #843

    • -0
    • +124
    ./fn/FunctionInitializerTest.java
  1. … 2 more files in changeset.
DRILL-5450: Fix initcap function to convert upper case characters correctly

This closes #821

  1. … 2 more files in changeset.
DRILL-5424: Fix IOBE for reverse function

close apache/drill#815

  1. … 1 more file in changeset.
DRILL-4963: Fix issues with dynamically loaded overloaded functions

close #701

  1. … 26 more files in changeset.
DRILL-1950: Parquet rowgroup level filter pushdown in query planning time.

Implement Parquet rowgroup level filter pushdown. The filter pushdown is performed in

in Drill physical planning phase.

Only a local filter, which refers to columns in a single table, is qualified for filter pushdown.

A filter may be qualified if it is a simple comparison filter, or a compound "and/or" filter consists of

simple comparison filter. Data types allowed in comparison filter are int, bigint, float, double, date,

timestamp, time. Comparison operators are =, !=, <, <=, >, >=. Operands have to be a column of the above

data types, or an explicit cast or implicit cast function, or a constant expressions.

This closes #637

  1. … 43 more files in changeset.
DRILL-4726: Dynamic UDF Support

1) Configuration / parsing / options / protos

2) Zookeeper integration

3) Registration / unregistration / lazy-init

4) Unit tests

This closes #574

    • -0
    • +279
    ./fn/registry/FunctionRegistryHolderTest.java
  1. … 71 more files in changeset.