Tagar commented on a change in pull request #23947: 
[SPARK-25863][SPARK-21871][SQL] Check if code size statistics is empty or not 
in updateAndGetCompilationStats
URL: https://github.com/apache/spark/pull/23947#discussion_r262570376
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ##########
 @@ -1352,7 +1352,11 @@ object CodeGenerator extends Logging {
       }
     }.flatten
 
-    codeSizes.max
+    if (codeSizes.nonEmpty) {
+      codeSizes.max
+    } else {
+      0
 
 Review comment:
   my 2 cents - We only have this issue on our most heavy prod jobs with a lot 
of columns and a lot of partitions.. I wonder if Spark struggles to collect 
some stats in this case, and then this becomes zero. We don't have a reproducer 
as it again only happens on our heaviest prod jobs.. but it does happen 
consistently when we're over a certain limit of number of columns or number of 
partitions/tasks, or both. Thanks.

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