sarutak commented on a change in pull request #32999:
URL: https://github.com/apache/spark/pull/32999#discussion_r655539482
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -349,8 +349,18 @@ class Analyzer(override val catalogManager: CatalogManager)
case p: LogicalPlan => p.transformExpressionsUpWithPruning(
_.containsPattern(BINARY_ARITHMETIC), ruleId) {
case a @ Add(l, r, f) if a.childrenResolved => (l.dataType,
r.dataType) match {
- case (DateType, _: DayTimeIntervalType) => TimeAdd(Cast(l,
TimestampType), r)
- case (_: DayTimeIntervalType, DateType) => TimeAdd(Cast(r,
TimestampType), l)
+ case (DateType, dit: DayTimeIntervalType) =>
Review comment:
The change in `Analyzer.scala` doesn't seem related to the issue raised
in SPARK-35727.
If we define the arithmetic operations between `DateType` and
`DayTimeIntervalType`, we should define such operators for
`YearMonthIntervalType` right?
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]