This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new ac618f034 enable hash joins on FixedSizeBinary columns (#5461)
ac618f034 is described below
commit ac618f034f566719f0a76c28608529b0a455a1c1
Author: Max Burke <[email protected]>
AuthorDate: Fri Mar 3 04:27:26 2023 -0800
enable hash joins on FixedSizeBinary columns (#5461)
---
datafusion/core/src/physical_plan/joins/hash_join.rs | 11 +++++++----
datafusion/expr/src/utils.rs | 1 +
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/datafusion/core/src/physical_plan/joins/hash_join.rs
b/datafusion/core/src/physical_plan/joins/hash_join.rs
index f30e18aa7..7752e1ebf 100644
--- a/datafusion/core/src/physical_plan/joins/hash_join.rs
+++ b/datafusion/core/src/physical_plan/joins/hash_join.rs
@@ -23,10 +23,10 @@ use ahash::RandomState;
use arrow::{
array::{
ArrayData, ArrayRef, BooleanArray, Date32Array, Date64Array,
Decimal128Array,
- DictionaryArray, LargeStringArray, PrimitiveArray,
Time32MillisecondArray,
- Time32SecondArray, Time64MicrosecondArray, Time64NanosecondArray,
- TimestampMicrosecondArray, TimestampMillisecondArray,
TimestampSecondArray,
- UInt32BufferBuilder, UInt64BufferBuilder,
+ DictionaryArray, FixedSizeBinaryArray, LargeStringArray,
PrimitiveArray,
+ Time32MillisecondArray, Time32SecondArray, Time64MicrosecondArray,
+ Time64NanosecondArray, TimestampMicrosecondArray,
TimestampMillisecondArray,
+ TimestampSecondArray, UInt32BufferBuilder, UInt64BufferBuilder,
},
datatypes::{
Int16Type, Int32Type, Int64Type, Int8Type, UInt16Type, UInt32Type,
UInt64Type,
@@ -1026,6 +1026,9 @@ fn equal_rows(
DataType::LargeUtf8 => {
equal_rows_elem!(LargeStringArray, l, r, left, right,
null_equals_null)
}
+ DataType::FixedSizeBinary(_) => {
+ equal_rows_elem!(FixedSizeBinaryArray, l, r, left, right,
null_equals_null)
+ }
DataType::Decimal128(_, lscale) => match r.data_type() {
DataType::Decimal128(_, rscale) => {
if lscale == rscale {
diff --git a/datafusion/expr/src/utils.rs b/datafusion/expr/src/utils.rs
index 5706ef304..8c1be4687 100644
--- a/datafusion/expr/src/utils.rs
+++ b/datafusion/expr/src/utils.rs
@@ -960,6 +960,7 @@ pub fn can_hash(data_type: &DataType) -> bool {
DataType::Decimal128(_, _) => true,
DataType::Date32 => true,
DataType::Date64 => true,
+ DataType::FixedSizeBinary(_) => true,
DataType::Dictionary(key_type, value_type)
if *value_type.as_ref() == DataType::Utf8 =>
{