carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CARBONDATA-270) [Filter Optimization] double data type value comparison optimization
Date Fri, 23 Sep 2016 10:41:20 GMT

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

ASF GitHub Bot commented on CARBONDATA-270:
-------------------------------------------

Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/incubator-carbondata/pull/194#discussion_r80221140
  
    --- Diff: core/src/main/java/org/apache/carbondata/scan/filter/FilterUtil.java ---
    @@ -1401,8 +1401,7 @@ public static void logError(Throwable e, boolean invalidRowsPresent)
{
       public static boolean nanSafeEqualsDoubles(Double d1, Double d2) {
         Boolean xIsNan = Double.isNaN(d1);
         Boolean yIsNan = Double.isNaN(d2);
    -    if ((xIsNan && yIsNan) || (d1.doubleValue() == d2.doubleValue())) {
    -
    +    if ((d1.doubleValue() == d2.doubleValue()) || (xIsNan && yIsNan)) {
    --- End diff --
    
     Boolean xIsNan = Double.isNaN(d1); these variables are already computed, no use of moving
them. Instead use ( Double.isNaN(d1) && Double.isNaN(d2))


> [Filter Optimization] double data type value comparison optimization
> --------------------------------------------------------------------
>
>                 Key: CARBONDATA-270
>                 URL: https://issues.apache.org/jira/browse/CARBONDATA-270
>             Project: CarbonData
>          Issue Type: Improvement
>          Components: core
>            Reporter: Sujith
>            Assignee: Sujith
>            Priority: Minor
>
> EqualsToExpression evaluation for double values first check for the equality of nan values
and then the double value comparison happens, since nan comparison scenarios are rare we can
push the comparison of nan after the double value comparison.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message