liukun4515 commented on issue #3582: URL: https://github.com/apache/arrow-datafusion/issues/3582#issuecomment-1256144912
> 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 > ``` Yes, I think we can follow other database or sql system. But It's long way to go and refactor. My plan is to do some refactor, and make good base for the next big refactor like the spark or other system. -- 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]
