uros-b commented on code in PR #56329:
URL: https://github.com/apache/spark/pull/56329#discussion_r3465951727


##########
docs/control-flow/leave-stmt.md:
##########
@@ -19,14 +19,14 @@ license: |
   limitations under the License.
 ---
 
-Terminates the execution of an iteration of a looping statement and continues 
with the next iteration if the looping condition is met.
+Terminates the execution of an iteration of a looping statement and exits the 
loop.

Review Comment:
   The new description still reads "Terminates the execution of an iteration of 
a looping statement and exits the loop." This is inherited ITERATE phrasing and 
is semantically incomplete for LEAVE: verified against AstBuilder.scala 
leaveOrIterateContextHasLabel (lines 607-635), LEAVE (isIterate=false) also 
matches BeginEndCompoundBlockContext and exits labeled BEGIN...END compound 
blocks, not only loops (ITERATE throws for that case).
   
   Suggesting something like:
   "Exits the execution of a labeled statement, which may be a looping 
construct or a labeled compound block."
   
   This should be strictly better than the wrong original, but still inaccurate 
as shipped.



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