Dandandan commented on a change in pull request #812:
URL: https://github.com/apache/arrow-datafusion/pull/812#discussion_r682319958
##########
File path: datafusion/src/physical_plan/hash_utils.rs
##########
@@ -438,11 +493,84 @@ pub fn create_hashes<'a>(
multi_col
);
}
+ DataType::Dictionary(index_type, _) => match **index_type {
+ DataType::Int8 => {
+ create_hashes_dictionary::<Int8Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ DataType::Int16 => {
+ create_hashes_dictionary::<Int16Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ DataType::Int32 => {
+ create_hashes_dictionary::<Int32Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ DataType::Int64 => {
+ create_hashes_dictionary::<Int64Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ DataType::UInt8 => {
+ create_hashes_dictionary::<UInt8Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ DataType::UInt16 => {
+ create_hashes_dictionary::<UInt16Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ DataType::UInt32 => {
+ create_hashes_dictionary::<UInt32Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ DataType::UInt64 => {
+ create_hashes_dictionary::<UInt64Type>(
+ col,
+ random_state,
+ hashes_buffer,
+ multi_col,
+ )?;
+ }
+ _ => {
+ return Err(DataFusionError::Internal(format!(
+ "Unsupported dictionary type in hasher hashing: {}",
+ col.data_type(),
+ )))
+ }
+ },
_ => {
// This is internal because we should have caught this before.
- return Err(DataFusionError::Internal(
- "Unsupported data type in hasher".to_string(),
- ));
+ return Err(DataFusionError::Internal(format!(
+ "Unsupported data type in hasher: {}",
Review comment:
:+1:
--
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]