Skip to content
Permalink
Browse files

[SPARK-25863][SPARK-21871][SQL] Check if code size statistics is empt…

…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 dfde0c6501637cce4704ee0edd146a73f9119305
@@ -1472,7 +1472,11 @@ object CodeGenerator extends Logging {
}
}.flatten

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

/**

0 comments on commit dfde0c6

Please sign in to comment.
You can’t perform that action at this time.