You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ya...@apache.org on 2019/03/07 08:38:28 UTC
[spark] branch branch-2.3 updated: [SPARK-25863][SPARK-21871][SQL]
Check if code size statistics is empty or not in
updateAndGetCompilationStats
This is an automated email from the ASF dual-hosted git repository.
yamamuro pushed a commit to branch branch-2.3
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-2.3 by this push:
new dfde0c6 [SPARK-25863][SPARK-21871][SQL] Check if code size statistics is empty or not in updateAndGetCompilationStats
dfde0c6 is described below
commit dfde0c6501637cce4704ee0edd146a73f9119305
Author: Takeshi Yamamuro <ya...@apache.org>
AuthorDate: Thu Mar 7 17:25:22 2019 +0900
[SPARK-25863][SPARK-21871][SQL] Check if code size statistics is empty 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 <ya...@apache.org>
Signed-off-by: Takeshi Yamamuro <ya...@apache.org>
---
.../spark/sql/catalyst/expressions/codegen/CodeGenerator.scala | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
index 9cf5839..d9eb142 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
@@ -1472,7 +1472,11 @@ object CodeGenerator extends Logging {
}
}.flatten
- codeSizes.max
+ if (codeSizes.nonEmpty) {
+ codeSizes.max
+ } else {
+ 0
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org