kosiew commented on code in PR #17281: URL: https://github.com/apache/datafusion/pull/17281#discussion_r2303202853
########## datafusion/expr-common/src/columnar_value.rs: ########## @@ -210,9 +210,22 @@ impl ColumnarValue { ) -> Result<ColumnarValue> { let cast_options = cast_options.cloned().unwrap_or(DEFAULT_CAST_OPTIONS); match self { - ColumnarValue::Array(array) => Ok(ColumnarValue::Array( - kernels::cast::cast_with_options(array, cast_type, &cast_options)?, - )), + ColumnarValue::Array(array) => match cast_type { + // fix https://github.com/apache/datafusion/issues/17285 + DataType::Struct(_) => { + let field = Field::new("", cast_type.clone(), true); + Ok(ColumnarValue::Array(cast_column( + array, + &field, + &cast_options, + )?)) + } + _ => Ok(ColumnarValue::Array(kernels::cast::cast_with_options( + array, + cast_type, + &cast_options, + )?)), + }, Review Comment: Removed this change. -- 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...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org