emkornfield commented on a change in pull request #9724:
URL: https://github.com/apache/arrow/pull/9724#discussion_r602767140



##########
File path: 
java/gandiva/src/test/java/org/apache/arrow/gandiva/evaluator/ProjectorTest.java
##########
@@ -1222,6 +1222,51 @@ public void testInExpr() throws GandivaException, 
Exception {
     eval.close();
   }
 
+  @Test
+  public void testInExprDouble() throws GandivaException, Exception {
+    Field c1 = Field.nullable("c1", float64);
+
+    TreeNode inExpr =
+            TreeBuilder.makeInExpressionDouble(TreeBuilder.makeField(c1),
+                    Sets.newHashSet(1.0, 2.0, 3.0, 4.0, 5.0, 15.0, 16.0));
+    ExpressionTree expr = TreeBuilder.makeExpression(inExpr, 
Field.nullable("result", boolType));
+    Schema schema = new Schema(Lists.newArrayList(c1));
+    Projector eval = Projector.make(schema, Lists.newArrayList(expr));
+
+    int numRows = 16;
+    byte[] validity = new byte[]{(byte) 255, 0};
+    double[] c1Values = new double[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 
13, 14, 15, 16};

Review comment:
       there should be tests someplace that excercise NaN -0.0 and -inf, +inf 
to verify behavior.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to