[
https://issues.apache.org/jira/browse/CARBONDATA-270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15579456#comment-15579456 ]
ASF GitHub Bot commented on CARBONDATA-270:
-------------------------------------------
Github user kumarvishal09 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/194#discussion_r83546209
--- Diff: core/src/main/java/org/apache/carbondata/scan/filter/FilterUtil.java ---
@@ -1426,4 +1423,25 @@ private static void getUnknownExpressionsList(Expression expression,
getUnknownExpressionsList(child, lst);
}
}
+ /**
+ * This method will compare double values it will preserve
+ * the -0.0 and 0.0 equality as per == ,also preserve NaN equality check as per
+ * java.lang.Double.equals()
+ *
+ * @param d1 double value for equality check
+ * @param d2 double value for equality check
+ * @return boolean after comparing two double values.
+ */
+ public static int compare(Double d1, Double d2) {
--- End diff --
Move this method to DataTypeUtil as it can be used from multiple places and change the method name to compareDouble
> [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)