Hussain Towaileb has posted comments on this change.

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


Patch Set 1:

(1 comment)

https://asterix-gerrit.ics.uci.edu/#/c/3009/1/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
File asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml:

PS1, Line 4588: expected < 3.0
> Running
Logically speaking, the definition of equality should stay the same, but that 
would partially weaken the data type check for the testing framework.

Looking at it from your point of view, I would suggest 2 options:

option 1: Revert back to the old behavior and be extra careful with the test 
cases, a good example would be the sum function:
array_sum([1.0, 2]) -> actual: 3.0, expected: 3.0, test: pass
array_sum([1, 2]) -> actual: 3, expected: 3, test: pass
array_sum([1, 2]) -> actual: 3, expected: 3.0, test: pass <- This is wrong
If we avoid the last case (by mistake or on purpose), then the equality is fine.

option 2: Throwing an appropriate Exception, something like 
MatchingValueDifferentDataTypeException, this way you know your result is 
correct, but you need to confirm the data types of either your result or 
expected value.

What do you think?


-- 
To view, visit https://asterix-gerrit.ics.uci.edu/3009
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I918b7e5c3c39271f77a7d5a01ff634c2a0221ebc
Gerrit-PatchSet: 1
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]>
Gerrit-HasComments: Yes

Reply via email to