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.
##########
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.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]