srowen commented on a change in pull request #29995:
URL: https://github.com/apache/spark/pull/29995#discussion_r502727803
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/InMemoryTable.scala
##########
@@ -106,6 +106,18 @@ class InMemoryTable(
case (micros: Long, TimestampType) =>
val localDate =
DateTimeUtils.microsToInstant(micros).atZone(UTC).toLocalDate
ChronoUnit.YEARS.between(EPOCH_LOCAL_DATE, localDate)
+ case _ => throw new Exception("""match may not be exhaustive.
Review comment:
I'd make this more meaningful, like an IllegalArgumentException
referring to the thing that does not match. Something simple.
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/streaming/StreamingQuerySuite.scala
##########
@@ -705,7 +705,7 @@ class StreamingQuerySuite extends StreamTest with
BeforeAndAfter with Logging wi
val q2 = startQuery(input(1).toDS.map { i =>
// Emulate that `StreamingQuery` get captured with normal usage
unintentionally.
// It should not fail the query.
- q1
+ val q = q1
Review comment:
This warning has always bugged me. I'm not sure if this change subverts
the test itself, but, not sure this is any better or worse at accidentally
capturing q1, so I'm OK with it.
----------------------------------------------------------------
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]