zhengruifeng commented on a change in pull request #35833:
URL: https://github.com/apache/spark/pull/35833#discussion_r825539735



##########
File path: 
external/kafka-0-10-sql/src/test/scala/org/apache/spark/sql/kafka010/KafkaContinuousSourceSuite.scala
##########
@@ -212,13 +212,14 @@ class KafkaContinuousSourceTopicDeletionSuite extends 
KafkaContinuousTest {
         testUtils.createTopic(topic2, partitions = 5)
         eventually(timeout(streamingTimeout)) {
           assert(
-            query.lastExecution.executedPlan.collectFirst {
-              case scan: ContinuousScanExec
-                if scan.stream.isInstanceOf[KafkaContinuousStream] =>
-                scan.stream.asInstanceOf[KafkaContinuousStream]
-            }.exists { stream =>
-              // Ensure the new topic is present and the old topic is gone.
-              stream.knownPartitions.exists(_.topic == topic2)
+            query.lastExecution.executedPlan.exists {

Review comment:
       I guess this logic is changed?
   
   suppose there are two `ContinuousScanExec` and the first one do not satisify 
`stream.knownPartitions.exists(_.topic == topic2)` but the second one satisify 
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.

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