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/11/01 08:46:34 UTC

[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #4057: Simplify InListExpr

tustvold commented on code in PR #4057:
URL: https://github.com/apache/arrow-datafusion/pull/4057#discussion_r1010213649


##########
datafusion/physical-expr/src/expressions/in_list.rs:
##########
@@ -17,50 +17,37 @@
 
 //! InList expression
 
+use ahash::RandomState;
 use std::any::Any;
-use std::collections::HashSet;
 use std::fmt::Debug;
 use std::sync::Arc;
 
-use arrow::array::GenericStringArray;
-use arrow::array::{
-    ArrayRef, BooleanArray, Float32Array, Float64Array, Int16Array, Int32Array,
-    Int64Array, Int8Array, OffsetSizeTrait, TimestampMicrosecondArray,
-    TimestampMillisecondArray, TimestampNanosecondArray, TimestampSecondArray,
-    UInt16Array, UInt32Array, UInt64Array, UInt8Array,
-};
-use arrow::{
-    datatypes::{DataType, Schema},
-    record_batch::RecordBatch,
-};
-
+use crate::hash_utils::HashValue;
 use crate::physical_expr::down_cast_any_ref;
 use crate::utils::expr_list_eq_any_order;
 use crate::PhysicalExpr;
 use arrow::array::*;
-use arrow::datatypes::TimeUnit;
-use datafusion_common::cast::as_date32_array;
-use datafusion_common::ScalarValue;
-use datafusion_common::ScalarValue::{
-    Binary, Boolean, Date32, Date64, Decimal128, Int16, Int32, Int64, Int8, LargeBinary,
-    LargeUtf8, TimestampMicrosecond, TimestampMillisecond, TimestampNanosecond,
-    TimestampSecond, UInt16, UInt32, UInt64, UInt8, Utf8,
-};
-use datafusion_common::{DataFusionError, Result};
+use arrow::datatypes::*;
+use arrow::downcast_primitive_array;
+use arrow::record_batch::RecordBatch;
+use arrow::util::bit_iterator::BitIndexIterator;
+use datafusion_common::{DataFusionError, Result, ScalarValue};
 use datafusion_expr::ColumnarValue;
+use hashbrown::hash_map::RawEntryMut;
+use hashbrown::HashMap;
 
 /// Size at which to use a Set rather than Vec for `IN` / `NOT IN`
 /// Value chosen by the benchmark at
 /// https://github.com/apache/arrow-datafusion/pull/2156#discussion_r845198369
 /// TODO: add switch codeGen in In_List
-static OPTIMIZER_INSET_THRESHOLD: usize = 30;
+static OPTIMIZER_INSET_THRESHOLD: usize = 10;

Review Comment:
   I need to double-check whether we even need this anymore



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