You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/11/03 00:53:00 UTC

[jira] [Commented] (ASTERIXDB-2469) Testing can result in false positives for Numerical tests

    [ https://issues.apache.org/jira/browse/ASTERIXDB-2469?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673862#comment-16673862 ] 

ASF subversion and git services commented on ASTERIXDB-2469:
------------------------------------------------------------

Commit a993e9bf8263481b1c57546cbe58461ef6e0ab5f in asterixdb's branch refs/heads/master from [~HussainHT]
[ https://git-wip-us.apache.org/repos/asf?p=asterixdb.git;h=a993e9b ]

[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 <ti...@apache.org>
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>


> Testing can result in false positives for Numerical tests
> ---------------------------------------------------------
>
>                 Key: ASTERIXDB-2469
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2469
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: TEST - Test Framework
>            Reporter: Hussain Towaileb
>            Assignee: Hussain Towaileb
>            Priority: Major
>
> The tests for numerical values can result in false positives, like the count function example below (current behavior):
> Expected value: 3 => Test passed => This is correct result and correct data type.
> Expected value: 3.0 => Test passed => This is correct result but wrong data type. (Count function returns BIGINT, this test should fail)
>  
> select element array_count((
>  select element x
>  from [1,2,3] as x
>  ));



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)