Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
[ASTERIXDB-2615][*DB] Enable constant folding rule to determine when to fold

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

Currently, some functions are excluded from being evaluated at compile time in

constant folding rule. Those functions are maintained in a set. The reason for

excluding them is because they can produce records/lists in their "open" format

and constant folding them will make them "closed" which would lead to incorrect

results. Any time a new function is implemented, the developer would have to pay

attention and add their functions if they should be excluded, too.

The exclusion set should be removed. The constant folding rule should determine

from the output type of the function whether it can/should be folded or not.

- fixed an issue with StaticTypeCastUtil where it would not open up a field

when that field's value is a function call.

- modified casting items of lists to avoid casting open the item when it is

already in the opened up format.

- modified the type computer of object_remove_fields to handle constant

arguments (the 2nd argument which is the name of the fields) since the

argument can be constant folded now.

- modified field-access-by-index to handle evaluating it at compile time

(by constant folding rule) in the case where the object accessed is missing

(or non-object)

Change-Id: I3964aa8accaaae3b4c5c7ddf928e6cbd73d517f6

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

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: Ali Alsuliman <ali.al.solaiman@gmail.com>

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

  1. … 49 more files in changeset.
[FUN] fix array functions when args have ANY type

- user model changes: no

- storage format changes: no

- interface changes: no

details:

This is to fix the array functions that use type inferer

in order to infer the types of the arguments at compile time.

In some cases, the args could have ANY type at compile time

but they return the correct required type at runtime. This

patch handles such scenarios.

Change-Id: I4d6cf358f0850e3cdd45f8de9939173b9797c6e8

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

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

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

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

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

  1. … 57 more files in changeset.
[NO ISSUE][FUN] Implement array functions p2

- user model changes: no

- storage format changes: no

- interface changes: no

details:

This is part of implementing array functions. This patch

includes array_distinct(), array_sort(). It includes

reorganization of array_reverse()

Change-Id: I5e9c4ff6400b7fe93ca2aab0234750dc78f50659

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

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

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>

  1. … 34 more files in changeset.
[NO ISSUE][FUN] Implement array functions p1

- user model changes: no

- storage format changes: no

- interface changes: no

details:

This is part of implementing array functions. This patch

includes array_insert(), array_append(), array_prepend()

array_put() and array_remove(). It includes re-organization

of those functions.

Change-Id: I7d9cb80325138daf99fb039793446d109481c94b

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

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

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

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

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

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

  1. … 43 more files in changeset.
[NO ISSUE][FUN] Implement array_append function

- user model changes: no

- storage format changes: no

- interface changes: no

details:

This is part of implementing array functions.

The array_append takes an input list and values to be

appended and return a new list with all the values.

array_append(list, val1,...)

Change-Id: I0a65549957060beee4579b903e6bd323745fb875

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

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: Dmitry Lychagin <dmitry.lychagin@couchbase.com>

  1. … 17 more files in changeset.