andygrove commented on issue #3582:
URL: 
https://github.com/apache/arrow-datafusion/issues/3582#issuecomment-1255326382

   Spark has an Analysis phase that runs before the optimizer. Maybe we can 
learn from their model. Within the analysis phase, they have a number of type 
coercion rules that they run:
   
   ```
     override def typeCoercionRules: List[Rule[LogicalPlan]] =
       UnpivotCoercion ::
       WidenSetOperationTypes ::
       new CombinedTypeCoercionRule(
         InConversion ::
         PromoteStrings ::
         DecimalPrecision ::
         BooleanEquality ::
         FunctionArgumentConversion ::
         ConcatCoercion ::
         MapZipWithCoercion ::
         EltCoercion ::
         CaseWhenCoercion ::
         IfCoercion ::
         StackCoercion ::
         Division ::
         IntegralDivision ::
         ImplicitTypeCasts ::
         DateTimeOperations ::
         WindowFrameCoercion ::
         StringLiteralCoercion :: Nil) :: Nil
   ```


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

Reply via email to