alamb commented on code in PR #23716:
URL: https://github.com/apache/datafusion/pull/23716#discussion_r3672038558


##########
datafusion/functions-aggregate/src/array_agg.rs:
##########
@@ -1025,10 +1043,12 @@ impl Accumulator for DistinctArrayAggAccumulator {
         let arrays = converter.convert_rows(rows)?;
 
         // `convert_rows` always returns the physical (non-dictionary) type.
-        // Cast back to the declared logical type when they differ so that
-        // e.g. Dictionary columns round-trip correctly through the 
RowConverter.
+        // Cast back to the declared logical type when they differ AND the
+        // declared type contains a Dictionary somewhere (directly or nested
+        // inside a Struct, List, etc.) — that is the only case where
+        // RowConverter strips the logical type.

Review Comment:
   I think @zhuqi-lucas also observed this too



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