Github user chenghao-intel commented on the pull request:

    https://github.com/apache/spark/pull/7034#issuecomment-116185200
  
    Thank you all for reviewing the code & suggestions.
    @cloud-fan  `DataTypeConstraint` doesn't aim to replace the existed generic 
type coercion rules in `HiveTypeCoercion`, particularly not for those cases 
need to make the identical data type for all of its children expression cases, 
like `Coalesce` or `BinaryArithmetic`
    @rxin `ExpectsInputTypes` couldn't describe the case of supporting multiple 
datatypes for single child expression. For example: `Length(child: Expression)` 
supports both `StringType` and `BinaryType` of the `child`, 
`AutoCastInputTypes` may also not able to auto infer the right casting, that's 
why I expose both of the interface in `DataTypeConstraint`
    
    Recently, we've been working on adding more expression, but always be 
challenged for the data type supporting / casting issues, that's would be great 
if we can figure out how to solve that ASAP, either in this PR or someone 
else's PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to