viirya commented on code in PR #307: URL: https://github.com/apache/datafusion-comet/pull/307#discussion_r1576969288
########## core/src/execution/datafusion/expressions/cast.rs: ########## @@ -103,10 +126,78 @@ impl Cast { (DataType::LargeUtf8, DataType::Boolean) => { Self::spark_cast_utf8_to_boolean::<i64>(&array, self.eval_mode)? } - _ => cast_with_options(&array, to_type, &CAST_OPTIONS)?, + ( + DataType::Utf8, + DataType::Int8 | DataType::Int16 | DataType::Int32 | DataType::Int64, + ) => Self::spark_cast_string_to_integral(to_type, &array, self.eval_mode)?, + ( + DataType::Dictionary(key_type, value_type), + DataType::Int8 | DataType::Int16 | DataType::Int32 | DataType::Int64, + ) if key_type.as_ref() == &DataType::Int32 Review Comment: Except for that any operator or expression during execution produce a dictionary with keys other than Int32 type. But for that I think it should be considered a bug for us to fix because I don't think it makes sense to change dictionary key type. -- 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