You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/04/12 16:05:14 UTC

[GitHub] [arrow] emkornfield commented on a change in pull request #9724: ARROW-11986: [C++][Gandiva] Implement IN expressions for doubles and floats

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



##########
File path: java/gandiva/src/test/java/org/apache/arrow/gandiva/evaluator/ProjectorTest.java
##########
@@ -1229,6 +1229,53 @@ 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, -0.0, 3.0, 4.0, Double.NaN,
+                            Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY));
+    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, -0.0, Double.NEGATIVE_INFINITY , Double.POSITIVE_INFINITY, Double.NaN,

Review comment:
       I tried to a quick search but its not clear that this code will handle .in values.




-- 
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:
users@infra.apache.org