Clone Tools
  • last updated 10 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
[NO ISSUE][FUN] Introduce IEvaluatorContext

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Introduce IEvaluatorContext - a context for evaluators

that is available both at runtime and during constant

folding at compile time

- IEvaluatorContext provides access to IHyracksTaskContext

which is only available at runtime. At compile time this

accessor returns null

- Instantiate evaluators with IEvaluatorContext

instead of IHyracksTaskContext

Change-Id: Iff90c7739e46d6602fcd0609e67f6a8cd9714ca5

Reviewed-on: https://asterix-gerrit.ics.uci.edu/3481

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>

Reviewed-by: Till Westmann <tillw@apache.org>

    • -2
    • +2
    ./ListifyAggregateFunctionEvalFactory.java
  1. … 686 more files in changeset.
[ASTERIXDB-2574][COMP] Fix min/max functions

- user model changes: no

- storage format changes: no

- interface changes: no

This change is mainly for 2 things. The first thing is to not throw

an exception when the type of the aggregated field is invalid for min/max

(e.g. record or rectange) or min/max get incompatible data like string

and int. The result in this case would be NULL. The second thing is to

enable comparing ARRAYs correctly by using logical comparison. When

a partition runs into type invalidity, it will output NULL. The global

aggregator interprets NULL received from a partition as type invalidity

and outputs NULL as the final result. Both SQL and SQL++ will do that.

Special treatment is needed for scalar and distinct version of SQL since

SQL min/max ignores NULL values and continue aggregation and the scalar

and distinct version of SQL are normally setup as a global aggregator

since they behave like the global aggregator in a two-step aggregation.

Currently, there is only a local min and max functions. The other

min/max functions are used for everything, the global function of

two-step aggregation, and for scalar and distinct min/max. In order to

differentiate, a global min/max functions are added that will be used

for the two-step aggregation.

Details:

- fixed listify to open up elements when adding them to the collection

and the collection item type is of type ANY and changed the type inferer

of listify to enable that.

- fixed AbstractCollectionType to make sure itemType is never null.

- changed MinMaxAggTypeComputer to not throw an exception but return

NULL for invalid types.

- changed min/max descriptors to implement inferer to propagate the

type of the field and pass that when getting a comparator.

- switched min/max comparison to the logical comparison.

- refactored method inequalityUndefined to be shared by logical comparison

and min/max functions.

- added global max/min functions to enable differentiating between

scalar min/max, distinct min/max and two-step min/max (global & local).

- code clean-up for LogicalScalarBinaryComparator; created two INSTANCES

and re-used.

Change-Id: I1231cfe558099d167bae0b2fa7fc4879b756baf0

Reviewed-on: https://asterix-gerrit.ics.uci.edu/3427

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>

    • -5
    • +20
    ./ListifyAggregateFunctionEvalFactory.java
  1. … 150 more files in changeset.
[ASTERIXDB-2516][RT] Modifty range map function of parallel sort

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

Currently, the range map function of parallel sort passes "null"

to get a comparator to sort the samples and produce the range map.

The comparator provider will enforce providing a type and prevent

passing "null". The range map function needs to be updated to get

the types of the sort fields and use them to get comparators.

- changed the output type of the local sampling function from

list of list of ANY to binary. The old type computer was removed.

- added null writer aggregate function that just produces null as

an aggregate value. this is needed in order to propagate the type

of the sort fields from the local step to the global step so that

the range map function can know the types of the sort fields.

Change-Id: I7edbb10906cc4464210af87a5b1630ba3aecbde0

Reviewed-on: https://asterix-gerrit.ics.uci.edu/3333

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Dmitry Lychagin <dmitry.lychagin@couchbase.com>

    • -0
    • +77
    ./NullWriterAggregateDescriptor.java
  1. … 13 more files in changeset.
[ASTERIXDB-2488][COMP] Support aggregate window functions

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Implement aggregate window functions:

agg_func() OVER (frame_var AS)? (PARTITION BY ... ORDER BY ... frame_spec)

- Where agg_func is a SQL/SQL++ aggregate function

- Fix percent_rank() to always return 0 for the first tuple

- Fix ntile() to handle NULL argument

- Log query after each rewrite rule in SqlppQueryRewriter

- Implement toString() for ADayTimeDuration, fix it for AYearMonthDuration

- Add seek() method to RunFileReader

Change-Id: If0f71118a04c2dbd3462070673d52e67f076b7e1

Reviewed-on: https://asterix-gerrit.ics.uci.edu/3049

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Ali Alsuliman <ali.al.solaiman@gmail.com>

    • -0
    • +44
    ./LastElementAggregateDescriptor.java
    • -0
    • +86
    ./LastElementEvalFactory.java
  1. … 853 more files in changeset.
[ASTERIXDB-2393][COMP][RT] Add source location to error messages

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Add source locations to compiler and runtime error messages

- Add source location enforcement to the test framework

and enable it for SqlppExecutionTest

Change-Id: Ie279ce345d1edcb5dea8e55cdb0233151c7bfd66

Reviewed-on: https://asterix-gerrit.ics.uci.edu/2659

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Till Westmann <tillw@apache.org>

    • -1
    • +1
    ./FirstElementAggregateDescriptor.java
    • -2
    • +7
    ./ListifyAggregateFunctionEvalFactory.java
    • -1
    • +1
    ./LocalFirstElementAggregateDescriptor.java
  1. … 676 more files in changeset.
[NO ISSUE] Incremental cleanup of deprecated exception ctors

Change-Id: I1e7c3655828fc6530cef83ea502a6cfbf41acddf

Reviewed-on: https://asterix-gerrit.ics.uci.edu/2533

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Murtadha Hubail <mhubail@apache.org>

    • -2
    • +2
    ./ListifyAggregateFunctionEvalFactory.java
  1. … 240 more files in changeset.
[ASTERIXDB-2154][COMP] Extensible built-in function management

- user model changes: no

- storage format changes: no

- interface changes: yes

Details:

- Support for augmenting built-in functions in ILangExtension

- Move function type inferers from NonTaggedDataFormat to

FunctionTypeInferers, exposed through IFunctionDescriptorFactory

and IFunctionManager

- Cleanup: obtain IFunctionManager/IDataFormat from MetadataProvider

Change-Id: Iafbf7e4e298fb7af6cb84b402cb00cfa2e90b5ce

Reviewed-on: https://asterix-gerrit.ics.uci.edu/2118

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Ian Maxon <imaxon@apache.org>

  1. … 59 more files in changeset.
Remove tinyaccessor dependency from production.

Change-Id: Ib2dfb36b59ba4a77884c30c2b11c2a846c4890fa

Reviewed-on: https://asterix-gerrit.ics.uci.edu/1459

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Michael Blow <mblow@apache.org>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Yingyi Bu <buyingyi@gmail.com>

  1. … 22 more files in changeset.
ASTERIXDB-1711: remove more mentions of Asterix

Change-Id: I21666fd54075ac56de8aab76bb7d5cdbec020121

Reviewed-on: https://asterix-gerrit.ics.uci.edu/1387

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Steven Jacobs <sjaco002@ucr.edu>

    • -3
    • +2
    ./FirstElementAggregateDescriptor.java
    • -3
    • +2
    ./LocalFirstElementAggregateDescriptor.java
  1. … 568 more files in changeset.
Unify runtime type exceptions by using error code and message template.

-- fixed string_join to be able to handle self-described list;

-- fixed the input arity of day_of_week;

-- added tests for exceptions.

RuntimeDataException is a newly added super class for errors in the data in the runtime.

It has the following subclasses:

-- IncompatibleTypeException, e.g., 1 + "2"

-- InvalidDataFormatException, e.g., boolean(1)

-- OverflowException, e.g., int8(1024)

-- TypeMismatchException, e.g., substr(1, 2)

-- UnderflowException, e.g., int8(-1024)

-- UnsupportedItemTypeException, e.g., string_concat(["a", 1, "c"])

-- UnsupportedTypeException, e.g., rectangle("1,2 3,4") + rectangle("2,5 7,8")

All "root-cause" exceptions thrown from runtime functions have an error code.

Going forward, all "root-cause" exceptions thrown from asterixdb

should have an error code.

Change-Id: Ie4fff8f5e64ffb027910a4899c0246b37ed5bce7

Reviewed-on: https://asterix-gerrit.ics.uci.edu/1313

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>

    • -3
    • +2
    ./FirstElementAggregateDescriptor.java
    • -9
    • +8
    ./ListifyAggregateFunctionEvalFactory.java
    • -3
    • +2
    ./LocalFirstElementAggregateDescriptor.java
  1. … 430 more files in changeset.
Clean up GROUP BY and WITH clause.

- fix ASTERIXDB-971, i.e., the expression to plan translator for FLWOGR without a "for";

- fix the scoping for nested WITH clause;

- fix the scoping for nested GROUP BY clause;

- fix default fields in group variables;

- fix/unify the expression substition AST visitor;

- enhance RemoveUnusedAssignAndAggregateRule to be able to remove unused GROUP BY

decoration varaibles;

- clearly sperate SQL++ aggregate functions and SQL-92 aggregate functions, i.e.,

SQL-92 aggregate sugars cannot apply to SQL++ aggregate functions;

- fix PushAggregateIntoGroupbyRule for nested plan deletions;

- enhance RemoveCartesianProductWithEmptyBranchRule;

- add ExtractGroupByDecorVariablesRule;

- add an aggregate function first-element;

- fix ASTERIXDB-1560, an error message issue.

Change-Id: I62fca7f937aa007d97ed87c75cef19f6aa3e5ade

Reviewed-on: https://asterix-gerrit.ics.uci.edu/1050

Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

Reviewed-by: Till Westmann <tillw@apache.org>

    • -0
    • +46
    ./FirstElementAggregateDescriptor.java
    • -0
    • +95
    ./FirstElementEvalFactory.java
    • -0
    • +45
    ./LocalFirstElementAggregateDescriptor.java
  1. … 233 more files in changeset.