cloud-fan commented on issue #24129: [SPARK-27190][SQL] add table capability 
for streaming
URL: https://github.com/apache/spark/pull/24129#issuecomment-482447024
 
 
   @rdblue The streaming side is very different from batch side. When you add 
the batch read/write capability, it's very useful to create an analyzer rule to 
do the check, so that we can fail earlier.
   
   However, at streaming side, these checks are done before invoking the 
analyzer. For example, in `MicroBatchExecution`, the check is done when we 
[prepare the original logical 
plan](https://github.com/apache/spark/blob/v2.4.1/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala#L115).
 Later on, for each micro-batch, we [invoke the 
analyzer/optimizer/planner](https://github.com/apache/spark/blob/v2.4.1/sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/MicroBatchExecution.scala#L519)
 to get the physical plan and run it.
   
   That said, if we move the streaming check to an analyzer rule, it's not 
fail-earlier, but later.
   
   You may argue that this is not an ideal way to invoke the 
analyzer/optimizer/planner. I'm happy to see some refactors around it, but I 
don't think it should block this PR.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to