lakshaydevoo-arch commented on code in PR #27008:
URL: https://github.com/apache/datafusion/pull/27008#discussion_r4452193334


##########
datafusion/common/benches/with_hashes.rs:
##########
@@ -290,9 +309,15 @@ impl StringPool {
         &self,
         array_length: usize,
     ) -> ArrayRef {
-        Arc::new(DictionaryArray::<T>::from_iter(
-            self.iter_strings(array_length),
-        ))
+        Arc::new(self.typed_dictionary_array::<T>(array_length))
+    }
+
+    /// Like [`Self::dictionary_array`], but returns the concrete 
`DictionaryArray`
+    fn typed_dictionary_array<T: ArrowDictionaryKeyType>(
+        &self,
+        array_length: usize,
+    ) -> DictionaryArray<T> {
+        DictionaryArray::<T>::from_iter(self.iter_strings(array_length))

Review Comment:
   I have  removed typed_dictionary_array() and reused the existing 
dictionary_array() helper, downcasting only where the concrete dictionary type 
is needed for generating null masks.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to