Github user dongjoon-hyun commented on the issue:
https://github.com/apache/spark/pull/15987
Thank you for review, @rxin . In the expression, the partition attribute
are assumed `String`, so Analyzer injects that.
I tried to implement the following recommended way in JIRA issue, but the
PR may choose not a clean way. Do you mean `CommandWithExpression` in
`command.scala` and `Analyzer.scala`?
> The Analyzer is injecting casts because the dataType of the partition
attribute is a String:
>
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AstBuilder.scala#L223
> This is not trivial to solve. If we want to properly fix this, we need to
use UnresolvedAttributes and do some add some analysis for this command.
Another - hackier - way of getting there would, to explicitly exclude this
command from analysis.
> I am personally a proponent of option 1.
---
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]