Clone Tools
  • last updated 17 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
[ASTERIXDB-2760][COMP] Improve function call resolution

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Refactor function call resolution and perform it earlier,

before GROUP BY expressions are substituted

- Consolidate gby-expr testcases into a single one

- Introduce QueryTranslator.handleDeclareFunctionStatement()

- Rename existing SqlppCaseExpressionVisitor to

SqlppCaseAggregateExtractionVisitor

- Move CASE expression rewriting code from

SqlppBuiltinFunctionRewriteVisitor into a separate visitor:

SqlppCaseExpressionVisitor

- Remove function name normalization code from SqlppAstPrintVisitor

and updated existing reference results

Change-Id: I527ffbff487b8534f66ca27d48788e96c65aec9b

Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/7264

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

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

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

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

    • -1
    • +1
    ./inverted-index-ngram-contains/inverted-index-ngram-contains.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-contains/inverted-index-ngram-edit-distance-contains.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-panic/inverted-index-ngram-edit-distance-panic.4.ast
    • -2
    • +2
    ./inverted-index-ngram-edit-distance-word-tokens/inverted-index-ngram-edit-distance-word-tokens.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance/inverted-index-ngram-edit-distance.4.ast
    • -3
    • +3
    ./inverted-index-ngram-jaccard/inverted-index-ngram-jaccard.4.ast
    • -1
    • +1
    ./inverted-index-olist-edit-distance-panic/inverted-index-olist-edit-distance-panic.4.ast
    • -1
    • +1
    ./inverted-index-olist-edit-distance/inverted-index-olist-edit-distance.4.ast
    • -1
    • +1
    ./inverted-index-olist-jaccard/inverted-index-olist-jaccard.4.ast
    • -1
    • +1
    ./inverted-index-ulist-jaccard/inverted-index-ulist-jaccard.4.ast
    • -1
    • +1
    ./inverted-index-word-contains/inverted-index-word-contains.4.ast
    • -3
    • +3
    ./inverted-index-word-jaccard/inverted-index-word-jaccard.4.ast
    • -4
    • +4
    ./range-search-open/range-search-open.5.ast
    • -3
    • +3
    ./rtree-secondary-index-circular-query/rtree-secondary-index-circular-query.4.ast
  1. … 1148 more files in changeset.
[NO ISSUE][COMP] Option to disable DisjunctivePredicateToJoinRule

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Added compiler option "rewrite_or_as_join" that

disables DisjunctivePredicateToJoinRule

set rewrite_or_as_join "false";

Default value is 'true' (the rule is enabled)

Change-Id: Ifbde19b7371a351d13ac2b05efa70a42eddbae7b

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

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

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

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

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

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

    • -0
    • +7
    ./disjunctive-predicate-1/disjunctive-predicate-1.3.ast
    • -0
    • +46
    ./disjunctive-predicate-1/disjunctive-predicate-1.4.ast
    • -0
    • +46
    ./disjunctive-predicate-1/disjunctive-predicate-1.5.ast
    • -0
    • +47
    ./disjunctive-predicate-1/disjunctive-predicate-1.6.ast
    • -0
    • +49
    ./disjunctive-predicate-1/disjunctive-predicate-1.7.ast
  1. … 23 more files in changeset.
[ASTERIXDB-2519][COMP] Fix compiler error with range predicate

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Fix compiler error (Could not infer type for variable ...)

when non-constant expressions are used in the range predicate

Change-Id: I8896e6c0743dcd5b608ebd5a5f25d3077047c789

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

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

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

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

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

    • -0
    • +67
    ./range-search-open/range-search-open.5.ast
    • -0
    • +67
    ./range-search/range-search.5.ast
  1. … 5 more files in changeset.
[ASTERIXDB-2193][SQLPP] Fix dataverse resolution in functions

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- When compiling user-defined function set default dataverse

to be the function's dataverse to correclty resolve dataset

accesses within that function

- Fix incorrect interpretation of quoted dataset names

FROM `a.b` now means FROM default_dataverse.`a.b`

(previously it meant FROM `a`.`b`)

Change-Id: I699b35fb46a739e9fdfcaf5cbfd6a4a00ce4da38

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

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

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: Till Westmann <tillw@apache.org>

    • -1
    • +1
    ./btree-index-composite-key-mixed-intervals/btree-index-composite-key-mixed-intervals.3.ast
    • -1
    • +1
    ./btree-index-composite-key/btree-index-composite-key.4.ast
    • -2
    • +2
    ./btree-index-rewrite-multiple/btree-index-rewrite-multiple.4.ast
    • -1
    • +1
    ./cust-index-age-nullable/cust-index-age-nullable.4.ast
    • -1
    • +1
    ./disjunctive-predicate-1/disjunctive-predicate-1.3.ast
    • -1
    • +1
    ./inverted-index-ngram-contains/inverted-index-ngram-contains.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-contains/inverted-index-ngram-edit-distance-contains.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-panic/inverted-index-ngram-edit-distance-panic.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-word-tokens/inverted-index-ngram-edit-distance-word-tokens.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance/inverted-index-ngram-edit-distance.4.ast
    • -1
    • +1
    ./inverted-index-ngram-jaccard/inverted-index-ngram-jaccard.4.ast
    • -1
    • +1
    ./inverted-index-olist-edit-distance-panic/inverted-index-olist-edit-distance-panic.4.ast
    • -1
    • +1
    ./inverted-index-olist-edit-distance/inverted-index-olist-edit-distance.4.ast
    • -1
    • +1
    ./inverted-index-olist-jaccard/inverted-index-olist-jaccard.4.ast
    • -1
    • +1
    ./inverted-index-ulist-jaccard/inverted-index-ulist-jaccard.4.ast
  1. … 1502 more files in changeset.
[NO ISSUE][COMP] Function references cleanup

- user model changes: no

- storage format changes: no

- interface change: no

Details: cleanup function references

- Use function identifiers when referring to built-in functions

- Use OperatorType enum when referring to operators

- Add FunctionSignature constructor that takes FunctionIdentifier

- Use asterix/algebricks namespace when referring to built-in functions

Change-Id: Ibad290182ed0f248f65987df97e6c61aac95b232

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

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

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>

Reviewed-by: Taewoo Kim <wangsaeu@gmail.com>

    • -1
    • +1
    ./btree-index-composite-key-mixed-intervals/btree-index-composite-key-mixed-intervals.3.ast
    • -1
    • +1
    ./btree-index-composite-key/btree-index-composite-key.4.ast
    • -2
    • +2
    ./btree-index-rewrite-multiple/btree-index-rewrite-multiple.4.ast
    • -1
    • +1
    ./cust-index-age-nullable/cust-index-age-nullable.4.ast
    • -1
    • +1
    ./disjunctive-predicate-1/disjunctive-predicate-1.3.ast
    • -1
    • +1
    ./inverted-index-ngram-contains/inverted-index-ngram-contains.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-contains/inverted-index-ngram-edit-distance-contains.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-panic/inverted-index-ngram-edit-distance-panic.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-word-tokens/inverted-index-ngram-edit-distance-word-tokens.4.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance/inverted-index-ngram-edit-distance.4.ast
    • -1
    • +1
    ./inverted-index-ngram-jaccard/inverted-index-ngram-jaccard.4.ast
    • -1
    • +1
    ./inverted-index-olist-edit-distance-panic/inverted-index-olist-edit-distance-panic.4.ast
    • -1
    • +1
    ./inverted-index-olist-edit-distance/inverted-index-olist-edit-distance.4.ast
    • -1
    • +1
    ./inverted-index-olist-jaccard/inverted-index-olist-jaccard.4.ast
    • -1
    • +1
    ./inverted-index-ulist-jaccard/inverted-index-ulist-jaccard.4.ast
  1. … 1569 more files in changeset.
ASTERIXDB-1539: add aliases for several builtin types and builtin functions.

- tinyint for int8;

- smallint for int16;

- integer(or, int) for int32;

- bigint for int64;

- year_month_duration for year-month-duration;

- day_time_duration for day-time-duration;

- timestamp for datetime;

- double precision for double;

int8, int16, int32, int64, year-month-duration and day-time-duration

is going to be deprecated.

In addition, it

- converts underscores to hypens for SQL++ functions;

- uses "array_" prefix for builtin aggregation functions.

Change-Id: I5c4a933f9775e89c2d503d9ea1cb98c5934d1475

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

Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>

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

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

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

    • -2
    • +2
    ./btree-index-composite-key-mixed-intervals/btree-index-composite-key-mixed-intervals.1.ast
    • -2
    • +2
    ./btree-index-composite-key/btree-index-composite-key.1.ast
    • -3
    • +3
    ./btree-index-rewrite-multiple/btree-index-rewrite-multiple.1.ast
    • -4
    • +4
    ./cust-index-age-nullable/cust-index-age-nullable.1.ast
    • -1
    • +1
    ./inverted-index-ngram-contains/inverted-index-ngram-contains.1.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-contains/inverted-index-ngram-edit-distance-contains.1.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-panic/inverted-index-ngram-edit-distance-panic.1.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance-word-tokens/inverted-index-ngram-edit-distance-word-tokens.1.ast
    • -1
    • +1
    ./inverted-index-ngram-edit-distance/inverted-index-ngram-edit-distance.1.ast
    • -1
    • +1
    ./inverted-index-ngram-jaccard/inverted-index-ngram-jaccard.1.ast
    • -4
    • +4
    ./inverted-index-olist-edit-distance-panic/inverted-index-olist-edit-distance-panic.1.ast
    • -4
    • +4
    ./inverted-index-olist-edit-distance/inverted-index-olist-edit-distance.1.ast
    • -4
    • +4
    ./inverted-index-olist-jaccard/inverted-index-olist-jaccard.1.ast
    • -4
    • +4
    ./inverted-index-ulist-jaccard/inverted-index-ulist-jaccard.1.ast
    • -1
    • +1
    ./inverted-index-word-contains/inverted-index-word-contains.1.ast
  1. … 3547 more files in changeset.
ASTERIXDB-1383: reduce the number of lines for "AS".

Change-Id: Ic655bf25701f33230787d175b78bedc489909cb0

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

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

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

    • -2
    • +1
    ./btree-index-composite-key-mixed-intervals/btree-index-composite-key-mixed-intervals.3.ast
    • -2
    • +1
    ./btree-index-composite-key/btree-index-composite-key.4.ast
    • -4
    • +2
    ./btree-index-rewrite-multiple/btree-index-rewrite-multiple.4.ast
    • -2
    • +1
    ./cust-index-age-nullable/cust-index-age-nullable.4.ast
    • -2
    • +1
    ./disjunctive-predicate-1/disjunctive-predicate-1.3.ast
    • -2
    • +1
    ./inverted-index-ngram-contains/inverted-index-ngram-contains.4.ast
    • -2
    • +1
    ./inverted-index-ngram-edit-distance-contains/inverted-index-ngram-edit-distance-contains.4.ast
    • -2
    • +1
    ./inverted-index-ngram-edit-distance-panic/inverted-index-ngram-edit-distance-panic.4.ast
    • -4
    • +2
    ./inverted-index-ngram-edit-distance-word-tokens/inverted-index-ngram-edit-distance-word-tokens.4.ast
    • -2
    • +1
    ./inverted-index-ngram-edit-distance/inverted-index-ngram-edit-distance.4.ast
    • -2
    • +1
    ./inverted-index-ngram-jaccard/inverted-index-ngram-jaccard.4.ast
    • -2
    • +1
    ./inverted-index-olist-edit-distance-panic/inverted-index-olist-edit-distance-panic.4.ast
    • -2
    • +1
    ./inverted-index-olist-edit-distance/inverted-index-olist-edit-distance.4.ast
    • -2
    • +1
    ./inverted-index-olist-jaccard/inverted-index-olist-jaccard.4.ast
    • -2
    • +1
    ./inverted-index-ulist-jaccard/inverted-index-ulist-jaccard.4.ast
  1. … 1705 more files in changeset.