datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Make type coercion rule more robust

Open andygrove opened this issue 3 years ago • 1 comments

Is your feature request related to a problem or challenge? Please describe what you are trying to do. Dask SQL project is seeing this:

Skipping optimizer rule TypeCoercion due to unexpected error: Error during planning: Coercion from [Timestamp(Nanosecond, Some("Europe/Berlin"))] to the signature Variadic([Int64]) failed.

Describe the solution you'd like It would be better for the rule to return the original expression rather than fail

Describe alternatives you've considered None

Additional context None

andygrove avatar Sep 07 '22 16:09 andygrove

Also happens in common_sub_expression_eliminate:

Skipping optimizer rule common_sub_expression_eliminate due to unexpected error: Error during planning: 'Timestamp(Nanosecond, None) + Int64' can't be evaluated because there isn't a common type to coerce the types to       

andygrove avatar Sep 07 '22 22:09 andygrove

I think we can close this issue now that there are specific issues filed for optimizer rules that are failing, such as https://github.com/apache/arrow-datafusion/issues/3797, https://github.com/apache/arrow-datafusion/issues/3416, https://github.com/apache/arrow-datafusion/issues/3417, and https://github.com/apache/arrow-datafusion/issues/3418.

andygrove avatar Oct 24 '22 19:10 andygrove