cloud-fan commented on code in PR #36531:
URL: https://github.com/apache/spark/pull/36531#discussion_r880666863
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSourceStrategy.scala:
##########
@@ -112,8 +112,10 @@ object DataSourceAnalysis extends Rule[LogicalPlan] {
// the reason that the parser has erased the type info of static
partition values
// and converted them to string.
case StoreAssignmentPolicy.ANSI | StoreAssignmentPolicy.STRICT =>
- Some(Alias(AnsiCast(Literal(partValue), field.dataType,
- Option(conf.sessionLocalTimeZone)), field.name)())
+ val cast =
+ Cast(Literal(partValue), field.dataType,
Option(conf.sessionLocalTimeZone), true)
Review Comment:
```suggestion
Cast(Literal(partValue), field.dataType,
Option(conf.sessionLocalTimeZone), ansiEnabled = true)
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]