HyukjinKwon commented on a change in pull request #23470: [SPARK-26549][PySpark] Fix for python worker reuse take no effect for parallelize xrange URL: https://github.com/apache/spark/pull/23470#discussion_r245877915
########## File path: python/pyspark/context.py ########## @@ -493,6 +493,10 @@ def getStart(split): return start0 + int((split * size / numSlices)) * step def f(split, iterator): + # it's an empty iterator here but we need this line for triggering the logic of + # checking END_OF_DATA_SECTION during load iterator in runtime, thus make sure Review comment: Can you elaborate `during load iterator in runtime` please? For instance, `FramedSerializer.load_stream` has its signal handling, for instance, `SpecialLengths.END_OF_DATA_SECTION` in `_read_with_length`. Since `FramedSerializer.load_stream` produces a generator, the control should at least be in that function once. Here we do it by explicitly converting the empty iterator to a list. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org