gemelen commented on a change in pull request #29995:
URL: https://github.com/apache/spark/pull/29995#discussion_r504024074



##########
File path: 
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/InMemoryTable.scala
##########
@@ -115,18 +117,24 @@ class InMemoryTable(
           case (micros: Long, TimestampType) =>
             val localDate = 
DateTimeUtils.microsToInstant(micros).atZone(UTC).toLocalDate
             ChronoUnit.MONTHS.between(EPOCH_LOCAL_DATE, localDate)
+          case (v, t) =>
+            throw new IllegalArgumentException("Match: unsupported argument(s) 
type - ($v, $t)")
         }
       case DaysTransform(ref) =>
         extractor(ref.fieldNames, schema, row) match {
           case (days, DateType) =>
             days
           case (micros: Long, TimestampType) =>
             ChronoUnit.DAYS.between(Instant.EPOCH, 
DateTimeUtils.microsToInstant(micros))
+          case (v, t) =>
+            throw new IllegalArgumentException("Match: unsupported argument(s) 
type - ($v, $t)")
         }
       case HoursTransform(ref) =>
         extractor(ref.fieldNames, schema, row) match {
           case (micros: Long, TimestampType) =>
             ChronoUnit.HOURS.between(Instant.EPOCH, 
DateTimeUtils.microsToInstant(micros))
+          case (v, t) =>
+            throw new IllegalArgumentException("Match: unsupported argument(s) 
type - ($v, $t)")

Review comment:
       Yes, pretty dumb error from my side, completely missed it (cause there 
was no test case for that code to be executed).
   Thanks for noticing




----------------------------------------------------------------
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]

Reply via email to