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 <[email protected]>
Signed-off-by: Takeshi Yamamuro <[email protected]>
  • Loading branch information
maropu committed Mar 7, 2019
1 parent a0e26cf commit 315c95c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,11 @@ object CodeGenerator extends Logging {
}
}.flatten

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

/**
Expand Down

0 comments on commit 315c95c

Please sign in to comment.