Skip to content

Commit

Permalink
[SPARK-25863][SPARK-21871][SQL] Check if code size statistics is empt…
Browse files Browse the repository at this point in the history
…y or not in updateAndGetCompilationStats

## What changes were proposed in this pull request?
`CodeGenerator.updateAndGetCompilationStats` throws an unsupported exception for empty code size statistics. This pr added code to check if it is empty or not.

## How was this patch tested?
Pass Jenkins.

Closes #23947 from maropu/SPARK-21871-FOLLOWUP.

Authored-by: Takeshi Yamamuro <yamamuro@apache.org>
Signed-off-by: Takeshi Yamamuro <yamamuro@apache.org>
  • Loading branch information
maropu committed Mar 7, 2019
1 parent 877b8db commit dfde0c6
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -1472,7 +1472,11 @@ object CodeGenerator extends Logging {
} }
}.flatten }.flatten


codeSizes.max if (codeSizes.nonEmpty) {
codeSizes.max
} else {
0
}
} }


/** /**
Expand Down

0 comments on commit dfde0c6

Please sign in to comment.