Github user sujith71955 commented on a diff in the pull request: https://github.com/apache/incubator-carbondata/pull/194#discussion_r83547082 --- 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) { + if ((d1.doubleValue() == d2.doubleValue()) || (Double.isNaN(d1) && Double.isNaN(d2))) { + return 0; + } + if (d1 < d2) { --- End diff -- one condition we can save in else, its fine i will update as per your comments. Thanks for reviewing.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---