You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by jr...@apache.org on 2017/11/27 19:11:39 UTC

incubator-impala git commit: IMPALA-3784: Fixed broken status-benchmark

Repository: incubator-impala
Updated Branches:
  refs/heads/master 79a5de102 -> 71fdbb926


IMPALA-3784: Fixed broken status-benchmark

A default constructed boost::optional is empty - it does
not contain a value, so get() cannot be called. The value
check should be required before using it.

Change-Id: I2fcdbdb4c5bc432a4d224dda821de132e3bca611
Reviewed-on: http://gerrit.cloudera.org:8080/8641
Reviewed-by: Jim Apple <jb...@apache.org>
Tested-by: Impala Public Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/71fdbb92
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/71fdbb92
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/71fdbb92

Branch: refs/heads/master
Commit: 71fdbb926f2bd4b0cca072a8a9d178790a3cbce3
Parents: 79a5de1
Author: Jinchul <ji...@gmail.com>
Authored: Fri Nov 24 13:42:03 2017 +0900
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Mon Nov 27 18:19:26 2017 +0000

----------------------------------------------------------------------
 be/src/benchmarks/status-benchmark.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/71fdbb92/be/src/benchmarks/status-benchmark.cc
----------------------------------------------------------------------
diff --git a/be/src/benchmarks/status-benchmark.cc b/be/src/benchmarks/status-benchmark.cc
index 5ef22b8..16f9da8 100644
--- a/be/src/benchmarks/status-benchmark.cc
+++ b/be/src/benchmarks/status-benchmark.cc
@@ -130,7 +130,7 @@ boost::optional<large_type> CallOptional(bool good) {
 
 void TestCallOptional(int batch_size, void* d) {
   bool g = ((data*)d)->good;
-  BODY_1K( global_large = CallOptional(g).get(); );
+  BODY_1K( if (auto v = CallOptional(g)) global_large = v.get(); );
 }