quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject [11/51] [abbrv] incubator-quickstep git commit: QUICKSTEP-95: Fixed the exception due to zero tuple estimation for the empty project expression.
Date Thu, 05 Oct 2017 22:03:06 GMT
QUICKSTEP-95: Fixed the exception due to zero tuple estimation for the empty project expression.


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/56b34363
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/56b34363
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/56b34363

Branch: refs/heads/new-op
Commit: 56b3436365aac95d98f04322869b138dcef31d3a
Parents: b1c3356
Author: Zuyu Zhang <zuyuz@apache.org>
Authored: Mon Jun 19 15:53:52 2017 -0500
Committer: Zuyu Zhang <zuyu@cs.wisc.edu>
Committed: Wed Sep 13 22:37:01 2017 -0500

----------------------------------------------------------------------
 storage/CMakeLists.txt                        | 1 +
 storage/SplitRowStoreTupleStorageSubBlock.cpp | 9 +++++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/56b34363/storage/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt
index 6446a83..92a3292 100644
--- a/storage/CMakeLists.txt
+++ b/storage/CMakeLists.txt
@@ -907,6 +907,7 @@ target_link_libraries(quickstep_storage_SimpleScalarSeparateChainingHashTable
                       quickstep_utility_Macros
                       quickstep_utility_PrimeNumber)
 target_link_libraries(quickstep_storage_SplitRowStoreTupleStorageSubBlock
+                      glog
                       quickstep_catalog_CatalogRelationSchema
                       quickstep_expressions_predicate_PredicateCost
                       quickstep_storage_SplitRowStoreValueAccessor

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/56b34363/storage/SplitRowStoreTupleStorageSubBlock.cpp
----------------------------------------------------------------------
diff --git a/storage/SplitRowStoreTupleStorageSubBlock.cpp b/storage/SplitRowStoreTupleStorageSubBlock.cpp
index 0e5cfe6..5060208 100644
--- a/storage/SplitRowStoreTupleStorageSubBlock.cpp
+++ b/storage/SplitRowStoreTupleStorageSubBlock.cpp
@@ -37,6 +37,8 @@
 #include "utility/Macros.hpp"
 #include "utility/ScopedBuffer.hpp"
 
+#include "glog/logging.h"
+
 namespace quickstep {
 
 QUICKSTEP_REGISTER_TUPLE_STORE(SplitRowStoreTupleStorageSubBlock, SPLIT_ROW_STORE);
@@ -128,6 +130,13 @@ SplitRowStoreTupleStorageSubBlock::SplitRowStoreTupleStorageSubBlock(
   tuple_slot_bytes_ = per_tuple_null_bitmap_bytes_
                       + relation.getFixedByteLength()
                       + relation.numVariableLengthAttributes() * (sizeof(std::uint32_t) *
2);
+  if (tuple_slot_bytes_ == 0) {
+    LOG(WARNING)
+        << "Estimated zero bytes per tuple for relation \"" << relation.getName()
+        << "\" (relation_id: " << relation.getID()
+        << "). Adjusting to 1 byte.";
+    tuple_slot_bytes_ = 1;
+  }
 
   // Size the occupancy bitmap by calculating the maximum tuples that can fit
   // assuming the bare-minimum per tuple storage is used (no variable-length


Mime
View raw message