Github user scwf commented on a diff in the pull request:
https://github.com/apache/spark/pull/4425#discussion_r24557748
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -69,6 +69,7 @@ class Analyzer(catalog: Catalog,
typeCoercionRules ++
extendedRules : _*),
Batch("Check Analysis", Once,
+ CheckCast ::
--- End diff --
If we check resolution first,
1 check cast will be invalid since legitimate cast expression must be not
resolved.
2 ```select cast(key as binary) from src``` will give a
```scala.NotImplementedError```
how about not change the order but catch exception of child.dataType to
make it pass this rule?
---
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]