[
https://issues.apache.org/jira/browse/CARBONDATA-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15515961#comment-15515961 ]
ASF GitHub Bot commented on CARBONDATA-270:
-------------------------------------------
Github user ManoharVanam commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/194#discussion_r80212063
--- 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 --
I think we can use Double.compare instead of these two checks
> [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)