alamb commented on code in PR #2891:
URL: https://github.com/apache/arrow-datafusion/pull/2891#discussion_r921571128


##########
datafusion/core/tests/path_partition.rs:
##########
@@ -149,9 +149,10 @@ async fn parquet_distinct_partition_col() -> Result<()> {
 
     assert_eq!(min_limit, resulting_limit);
 
-    let month = match ScalarValue::try_from_array(results[0].column(1), 0)? {
-        ScalarValue::Utf8(Some(month)) => month,
-        s => panic!("Expected count as Int64 found {}", s.get_datatype()),
+    let s = ScalarValue::try_from_array(results[0].column(1), 0)?;

Review Comment:
   this is because the dictionary encoding is preserved in the `ScalarValue` now



##########
datafusion/physical-expr/src/aggregate/count_distinct.rs:
##########
@@ -65,15 +65,6 @@ impl DistinctCount {
     }
 }
 
-/// return the type to use to accumulate state for the specified input type

Review Comment:
   this workaround is no longer needed 🎉 



-- 
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-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to