Hello Anon. E. Moose #1000171, Jenkins,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#2).

Change subject: [ASTERIXDB-2469][TEST] Tests Can Result In False Positives For 
Numericals
......................................................................

[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
---
M 
asterixdb/asterix-app/src/test/java/org/apache/asterix/test/common/TestExecutor.java
A 
asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/ensure_result_numeric_type/ensure_result_numeric_type.3.query.sqlpp
A 
asterixdb/asterix-app/src/test/resources/runtimets/results/misc/ensure_result_numeric_type/ensure_result_numeric_type.1.adm
M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
M 
asterixdb/asterix-runtime/src/main/java/org/apache/asterix/runtime/evaluators/common/NumberUtils.java
5 files changed, 102 insertions(+), 13 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb 
refs/changes/09/3009/2
-- 
To view, visit https://asterix-gerrit.ics.uci.edu/3009
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I918b7e5c3c39271f77a7d5a01ff634c2a0221ebc
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Hussain Towaileb <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Hussain Towaileb <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>

Reply via email to