jackylee-ch commented on code in PR #25700:
URL: https://github.com/apache/datafusion/pull/25700#discussion_r4144193021
##########
datafusion/functions/src/datetime/to_char.rs:
##########
@@ -286,12 +286,15 @@ fn to_char_array(args: &[ColumnarValue]) ->
Result<ColumnarValue> {
}
let result = builder.finish();
+ // Only collapse to a scalar when the whole output is a single row. When
the
+ // format column has more than one row, a scalar `args[0]` was expanded to
a
+ // full array, so returning row 0 would repeat it for every row.
match args[0] {
Review Comment:
Done in the new commit: the scalar/array choice now depends only on
`result.len()`, the comment is gone, and the unit test is removed since the
`timestamps.slt` case covers it (it fails on `main` and passes here).
--
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]