yadavay-amzn commented on code in PR #56526:
URL: https://github.com/apache/spark/pull/56526#discussion_r3432118473


##########
connector/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaMicroBatchSourceSuite.scala:
##########
@@ -1883,6 +1883,14 @@ abstract class KafkaMicroBatchV2SourceSuite extends 
KafkaMicroBatchSourceSuiteBa
     // test null latestAvailablePartitionOffsets
     assert(KafkaMicroBatchStream.metrics(Optional.ofNullable(offset), 
None).isEmpty)
   }
+
+  test("SPARK-57438: metrics should not NPE when latest partition offsets are 
unavailable" +

Review Comment:
   Agreed, replaced it with an instance-level test that drives metrics() while
     latestPartitionOffsets is null; verified it fails with the original NPE if 
line 360 is reverted to
     Some(...).



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

Reply via email to