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/05 04:19:36 UTC

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

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


##########
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:
   I think it's because `ScalarValue` is an enum of a wrapper of value. So it would be overheads for both memory footprint and computation compared to HashSet of native data 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.

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

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