Clone
 

hussain towaileb <hussainht@gmail.com> in asterixdb

[ASTERIXDB-2569][TEST] Refactor type computer tests

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Converted type computer tests to be parameterized.

- Moved the tests to appropriate packages to use the

log4j logger.

- Type computer instances check is based on the field

type instead of field name.

Change-Id: I4426efcc9e825ebb00e04e3783d18bb1cbb63a90

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

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

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

[ASTERIXDB-2535][COMP] Fix uuid present in insert/upsert statement

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Added a new record merge function, extending the old one, to handle

the merge of duplicate fields.

- Updated the record merge type computer to handle the merge of

duplicate fields properly at compile time.

- Added a new record merge descriptor and evaluator, extending

the old one, to handle the merge of duplicate fields properly

at runtime.

- Updated IntroduceAutogenerateIDRule to use the new record merge

function.

- Added test cases to test the newly added function for insert

and upsert statements.

Change-Id: I22100d3ff29864b8bfd54b0decb183e5056fdb4a

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

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

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

Reviewed-by: Hussain Towaileb <hussainht@gmail.com>

  1. … 53 more files in changeset.
[NO ISSUE][FUN] Introduce data generator function

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Introduced data generator function to generate data with accordance

to the TPC Benchmark DS specifications.

- Data generator function accepts 2 arguments, table name and scaling

factor, this makes the same function reusable for all the desired

tables and scaling factors to be generated.

- Added test cases for the data generator functions.

Change-Id: Idb6bd6f697628395c70008e6f730bc5ca403da5e

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

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

[NO ISSUE] Introduce MissingNullInOutFunction annotation

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- This annotation is for functions that respect the missing/null in ->

missing/null out behavior.

- Removed all the hardcoded functions inside the NullMissingTest and

ExceptionIT test classes.

- Functions annotated with the MissingNullInOutFunction are

automatically included in the NullMissingTest and ExceptionIT tests.

- Renamed ExceptionIT class to NullMissingExceptionTest.

- Moved NullMissingTest and NullMissingExceptionTest to their

appropriate packages to read the Logger config properly.

Change-Id: I253373ae4c8e23d9f5ed38f5fbbdefe9680e04b4

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

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: Murtadha Hubail <mhubail@apache.org>

  1. … 258 more files in changeset.
[NO ISSUE] Fix class name typo

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- CalendarDuartionFromDateDescriptor -> CalendarDurationFromDateDescriptor

typo fix.

Change-Id: Ice71fd27ccf9ffd39e4ff368063c0715e33959db

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

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: Murtadha Hubail <mhubail@apache.org>

[NO ISSUE][FUN] Code generator alternative

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Possible alternative to replace the generated code with a static

method that does the NULL and MISSING checking step.

- Missing and Null check uses static method and helper methods

instead of varargs as a method argument.

- NullMissingTest and ExceptionIT manually add the functions that need

to be tested, this behavior will be changed later, the functions

that need to be tested for the "missing/null in -> missing/null out"

behavior will have their own flagging mechanism (annotation or

a method) indicating that those methods will be tested, and

the manual addition of functions will be removed.

Change-Id: Icca2e2128c4b0f2bfd8675655cf5296cbbaeba88

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

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

Contrib: Michael Blow <mblow@apache.org>

Integration-Tests: Michael Blow <mblow@apache.org>

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

  1. … 167 more files in changeset.
[NO ISSUE][COMP] Documenting BreakSelectIntoConjunctsRule

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Added documentation for BreakSelectIntoConjunctsRule.

- Renamed some variables for easier readability and maintenance.

- No actual code/logic changes.

Change-Id: Iadc5dc41115f91caa835255396969eaf47e1356d

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

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

[NO ISSUE][LIC] Fix ASF License typo

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Fix a typo in the ASF license in some files.

Change-Id: I8841434bb00f40833eaec73c76f44cb65fcfb3b0

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

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: Ian Maxon <imaxon@uci.edu>

[NO ISSUE][COMP] Optim rules comments + minor changes

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- CheckFilterExpressionTypeRule checks if the optimization

context has the output type environment before computing it.

- Minor addition/changes to rule comments.

Change-Id: I6f5cb78125657ff2bb4658af40bfc9d9cbff184e

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

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

[NO ISSUE] Refactoring plan optimization method

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Refactoring plan optimization method.

Change-Id: I8275bca00b41969444824cffd12f542d802bf26f

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

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

[NO ISSUE] Renaming AQL variables to more generic names

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Renaming AQL variables to more generic names.

Change-Id: If9cf5fc13e1da7c9e172c2b866643973fafaaf13

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

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>

[ASTERIXDB-2498][DOC] List slice documentation for SQL++

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Added list slice syntax documentation.

Change-Id: Iff9bb0e82f31cefcdd19ace0d02fc07e7d00025f

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

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>

[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. … 23 more files in changeset.
[NO ISSUE] Fix subqueries for IndexAccessor syntax

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Fixed subqueries for IndexAccessor syntax.

- Added test cases for function and subquery calls as arguments.

Change-Id: Iba16c6c04a526aec117ca3adcb168cdd4ba916a8

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

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>

[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. … 23 more files in changeset.
[ASTERIXDB-2451][DOC] Fix object_unwrap() documentation

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Fixed the documentation for object_unwrap function.

Change-Id: Id5822a51e49676dcd9aae35455d2e19fb6dfee07

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

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

[ASTERIXDB-2484][FUN] Supporting SINH, COSH and TANH functions

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Added support for sinh, cosh and tanh Math functions.

- Added sinh, cosh and tanh test cases.

- Added sinh, cosh and tanh documentation.

Change-Id: I0853bfe4511ad5b087b875005719957ee23e8575

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

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

[NO ISSUE] Rename aqlStatements variable to statements

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- Renaming "aqlStatements" variables to "statements" to be more

generic, due to the support of SQL++ and deprecation of AQL, and

in case of new languages in the future.

Change-Id: Ic0a1f2b9dd53169b8298d516a7358f49c24f2e8a

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

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: Murtadha Hubail <mhubail@apache.org>

[ASTERIXDB-2460][FUN] Fix sum() overflow bug

- user model changes: yes

- storage format changes: no

- interface changes: no

Details:

- Fixed the sum() overflow problem. Now the sum() function will

return either bigint or double based on the input types.

- Added sum() aggregate local, intermediate and global classes.

Currently, it is using the same class for the three steps and

checking the type using an if statement. Although the three

steps all have a very similar behavior, having them in split

classes makes it cleaner and easier to read and maintain in the

future.

- Added sum() aggregate local, intermediate and global for serialized

classes.

- Added sum() and serial sum() test cases and modified test cases

to cause the reported overflow issue.

- Added sum() and serial sum() test cases that cause a

Long.MAX_VALUE type overflow.

- Valid data type check is now part of the sum calculation to

avoid redundant steps.

Change-Id: I987417770b3bfbda6af29a27acc8c96dc8a99eb8

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

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. … 158 more files in changeset.
[ASTERIXDB-2469][TEST] Tests Can Result In False Positives For Numericals

- user model changes: no

- storage format changes: no

- interface changes: no

Details:

- The test framework doesn’t differentiate between numeric types in

expected results.

- With the current behavior, when comparing numerical cases,

as a last step, we try to convert both numbers to double and

do a comparison (in case the String camparison failed already),

this is good for the cases of having something like: expected 100.0

and acutal 10E1 (for whatever reason), in this case the String comparison

will fail, but the double conversion will produce the correct result.

- With this change, we ensure the above behavior is maintained,

however, we check that the types are compatible first, for example,

if the expected is 100.0 and the actual is 100.0, this should succeed,

but if the expected is 100.0 and the actual is 100, then this will fail,

this way we ensure correctness of both the numerical value as well as

correctness of data type check.

Change-Id: I918b7e5c3c39271f77a7d5a01ff634c2a0221ebc

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

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

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>