|
16 | 16 | // under the License. |
17 | 17 |
|
18 | 18 | use crate::aggregates::group_values::group_column::{ |
19 | | - ByteGroupValueBuilder, GroupColumn, PrimitiveGroupValueBuilder, |
| 19 | + ByteGroupValueBuilder, ByteViewGroupValueBuilder, GroupColumn, |
| 20 | + PrimitiveGroupValueBuilder, |
20 | 21 | }; |
21 | 22 | use crate::aggregates::group_values::GroupValues; |
22 | 23 | use ahash::RandomState; |
23 | 24 | use arrow::compute::cast; |
24 | 25 | use arrow::datatypes::{ |
25 | | - Date32Type, Date64Type, Float32Type, Float64Type, Int16Type, Int32Type, Int64Type, |
26 | | - Int8Type, UInt16Type, UInt32Type, UInt64Type, UInt8Type, |
| 26 | + BinaryViewType, Date32Type, Date64Type, Float32Type, Float64Type, Int16Type, |
| 27 | + Int32Type, Int64Type, Int8Type, StringViewType, UInt16Type, UInt32Type, UInt64Type, |
| 28 | + UInt8Type, |
27 | 29 | }; |
28 | 30 | use arrow::record_batch::RecordBatch; |
29 | 31 | use arrow_array::{Array, ArrayRef}; |
@@ -119,6 +121,8 @@ impl GroupValuesColumn { |
119 | 121 | | DataType::LargeBinary |
120 | 122 | | DataType::Date32 |
121 | 123 | | DataType::Date64 |
| 124 | + | DataType::Utf8View |
| 125 | + | DataType::BinaryView |
122 | 126 | ) |
123 | 127 | } |
124 | 128 | } |
@@ -184,6 +188,14 @@ impl GroupValues for GroupValuesColumn { |
184 | 188 | let b = ByteGroupValueBuilder::<i64>::new(OutputType::Binary); |
185 | 189 | v.push(Box::new(b) as _) |
186 | 190 | } |
| 191 | + &DataType::Utf8View => { |
| 192 | + let b = ByteViewGroupValueBuilder::<StringViewType>::new(); |
| 193 | + v.push(Box::new(b) as _) |
| 194 | + } |
| 195 | + &DataType::BinaryView => { |
| 196 | + let b = ByteViewGroupValueBuilder::<BinaryViewType>::new(); |
| 197 | + v.push(Box::new(b) as _) |
| 198 | + } |
187 | 199 | dt => { |
188 | 200 | return not_impl_err!("{dt} not supported in GroupValuesColumn") |
189 | 201 | } |
|
0 commit comments