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 2022/04/04 19:14:22 UTC

[GitHub] [arrow-datafusion] Dandandan commented on a diff in pull request #2156: Add an InSet as an optimized version for IN_LIST

Dandandan commented on code in PR #2156:
URL: https://github.com/apache/arrow-datafusion/pull/2156#discussion_r841898112


##########
datafusion/physical-expr/src/expressions/in_list.rs:
##########
@@ -69,6 +72,23 @@ pub struct InListExpr {
     expr: Arc<dyn PhysicalExpr>,
     list: Vec<Arc<dyn PhysicalExpr>>,
     negated: bool,
+    set: Option<InSet>,
+}
+
+/// InSet
+#[derive(Debug)]
+pub struct InSet {
+    set: HashSet<ScalarValue>,

Review Comment:
   Just a note: because of using `ScalarValue` we are a bit slower than if we could use basic types, like `HashSet<u32>`, etc. The same apllies to the existing implementation based on `Vec`. I think that could be a couple times faster for both implementations.



-- 
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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

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