Clone Tools
  • last updated 24 mins ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
[ASTERIXDB-2658][FUN] Add support for array_except() function

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Added array_except function.

- Added test cases for array_except() function.

Change-Id: I7c1befeffdb0f651afab31a4e814842a67d3a54c

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

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>

    • -0
    • +18
    ./array_except/001/array_except.3.adm
    • -0
    • +18
    ./array_except/002/array_except.3.adm
    • -0
    • +1
    ./array_except/003/array_except.3.adm
    • -0
    • +1
    ./array_except/004/array_except.1.adm
    • -0
    • +1
    ./array_except/005/array_except.1.adm
    • -0
    • +1
    ./array_except/006/array_except.1.adm
  1. … 21 more files in changeset.
[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
    • +11
    ./array_distinct/array_distinct.3.adm
    • -1
    • +17
    ./array_flatten/array_flatten.3.adm
    • -1
    • +10
    ./array_prepend/array_prepend.3.adm
    • -0
    • +8
    ./array_remove/array_remove.5.adm
    • -1
    • +25
    ./array_replace/array_replace.3.adm
  1. … 35 more files in changeset.
[NO ISSUE][FUN] Modify array functions to allow comparing complex

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

This change is to modify the array functions to compare complex

types like arrays and records. The change also includes a small

fix to IsomorphismVariableMappingVisitor where the

NestedTupleSourceOperator visit method would downcast the args

without checking first they are of the same operator types.

- changed test cases

- changed NullMissingTest to pass the args types for functions

that need them.

Change-Id: I416989cf902eda38224a3b00340e478fc4e3a60c

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

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

    • -0
    • +1
    ./array_contains/array_contains.4.adm
    • -0
    • +1
    ./array_distinct/array_distinct.4.adm
    • -0
    • +1
    ./array_intersect/array_intersect.4.adm
    • -0
    • +1
    ./array_position/array_position.4.adm
    • -0
    • +1
    ./array_put/array_put.4.adm
    • -0
    • +1
    ./array_remove/array_remove.4.adm
    • -0
    • +1
    ./array_replace/array_replace.4.adm
    • -0
    • +1
    ./array_sort/array_sort.4.adm
    • -0
    • +1
    ./array_symdiff/array_symdiff.4.adm
    • -0
    • +1
    ./array_symdiffn/array_symdiffn.4.adm
    • -0
    • +1
    ./array_union/array_union.4.adm
  1. … 98 more files in changeset.
[FUN][RT] Objects creation in array functions

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- deallocate caster pointables for array functions using casting

- avoid object creations in:

ArrayIntersectDescriptor, AbstractArrayProcessEval, ArrayPutDescriptor, ArrayStarDescriptor

- avoid iterator creations in:

ArrayIntersectDescriptor, ArrayStarDescriptor, ArraySymDiffEval

- avoid evaluating the lists arguments twice when casting them

- use getOrWriteItem() instead of writeItem() when accessing a serialized list

- fix array_intersect to pick the smallest list as a starting list

Change-Id: Ib6c8c55ed3e0a35e00c5976a46e9ed6e432a6e9f

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

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>

    • -1
    • +1
    ./array_intersect/array_intersect.3.adm
  1. … 15 more files in changeset.
[ASTERIXDB-2476][COMP] Array slicing parser syntax

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Added slice parser syntax. [list][start:end], the syntax accepts

end expression as an optional argument, the expression can be

written as [list][start:].

- Added slice parser test cases.

Change-Id: Ie83283bfd0a04257b59b573de3dab6b3e47de1bf

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

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. … 37 more files in changeset.
[ASTERIXDB-2476][FUN] Support array slicing in SQL++

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Added array_slice function. 2 functions were added, one that

accepts 2 arguments and the other accepts 3 arguments. The

arguments are (list, start, end) respectively.

- Added array_slice function test cases.

- Array slice syntax and documentation will be added in subsequent

changes.

Change-Id: Ic609676cc068e92c6342fb0fa4c9074ec4bd98bf

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

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. … 33 more files in changeset.
[NO ISSUE][FUN] Add docs for array functions, handle FP.

- user model changes: no

- storage format changes: no

- interface changes: no

details:

Add docs for array functions and remove error codes from

error messages in test suite.

This patch also includes handling of floating-point number

arguments for array_range(), array_insert(), array_repeat().

Change-Id: I908338a7db9c0aa0b30acc6f9810327604a8368c

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

Reviewed-by: Till Westmann <tillw@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. … 24 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
    • +1
    ./array_intersect/array_intersect.3.adm
  1. … 43 more files in changeset.
[NO ISSUE][FUN] Implement array functions p3

- user model changes: no

- storage format changes: no

- interface changes: no

details:

array_concat(), array_flatten(), array_ifnull(), array_intersect()

array_range(), array_replace(), array_star(), array_symdiff(),

array_symdiffn(), array_union()

Change-Id: Ida0d12d48f8c676d5a93b024c301dd13ef400247

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

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>

    • -0
    • +1
    ./array_concat/array_concat.3.adm
    • -0
    • +1
    ./array_flatten/array_flatten.3.adm
    • -0
    • +1
    ./array_ifnull/array_ifnull.3.adm
    • -0
    • +1
    ./array_intersect/array_intersect.3.adm
    • -0
    • +1
    ./array_range/array_range.3.adm
    • -0
    • +1
    ./array_replace/array_replace.3.adm
    • -0
    • +1
    ./array_star/array_star.3.adm
    • -0
    • +1
    ./array_symdiff/array_symdiff.3.adm
    • -0
    • +1
    ./array_symdiffn/array_symdiffn.3.adm
    • -0
    • +1
    ./array_union/array_union.3.adm
  1. … 91 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>

    • -0
    • +1
    ./array_distinct/array_distinct.3.adm
    • -0
    • +1
    ./array_sort/array_sort.3.adm
  1. … 32 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>

    • -0
    • +1
    ./array_insert/array_insert.3.adm
    • -0
    • +1
    ./array_prepend/array_prepend.3.adm
    • -0
    • +1
    ./array_put/array_put.3.adm
    • -0
    • +1
    ./array_remove/array_remove.3.adm
  1. … 39 more files in changeset.
[NO ISSUE] add function array_repeat

- user model changes: no

- storage format changes: no

- interface changes: no

Change-Id: Ic5f9e503a81ba86dd873ad61fd35a2f695905dad

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

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

    • -0
    • +1
    ./array_repeat/array_repeat.1.adm
  1. … 6 more files in changeset.
[NO ISSUE][FUN] Implement array_contains() function

- user model changes: no

- storage format changes: no

- interface changes: no

details:

This is part of implementing array functions.

The array_contains() takes an input list and a value

and returns true if the value is present in the list.

array_contains(list, val). An error is thrown if

val is object or list.

Change-Id: Ib0222ebdb4dcaaab696ebe23973be8b2347da64b

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

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

    • -0
    • +1
    ./array_contains/array_contains.3.adm
  1. … 12 more files in changeset.
[NO ISSUE][FUN] Implement array_reverse() function

- user model changes: no

- storage format changes: no

- interface changes: no

details:

This is part of implementing array functions.

The array_reverse() takes an input list and returns

a new list with the elements in reverse.

array_reverse(list).

Change-Id: Ib9d9f8e760390a708d67a2cab357bf4722271381

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

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

    • -0
    • +1
    ./array_reverse/array_reverse.3.adm
  1. … 9 more files in changeset.
[NO ISSUE][FUN] Implement array_position function

- user model changes: no

- storage format changes: no

- interface changes: no

details:

This is part of implementing array functions.

The array_position() takes an input list and a value

and returns the index of the value in the array or

-1 if the value is not found.

array_position(list, val). An error is thrown if

val is object or list.

Change-Id: I4604d347a22f98071a68abee43693fca9096b361

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

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

    • -0
    • +1
    ./array_position/array_position.3.adm
  1. … 15 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>

    • -0
    • +1
    ./array_append/array_append.3.adm
  1. … 17 more files in changeset.