parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject parquet-cpp git commit: PARQUET-679: Fix debug asserts in tests (msvc/debug build)
Date Fri, 12 May 2017 12:57:49 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master e22a5cd34 -> 2398317d1


PARQUET-679: Fix debug asserts in tests (msvc/debug build)

Fix debug asserts in tests (msvc/debug build)

Author: revaliu <revaliu@microsoft.com>

Closes #322 from rip-nsk/PARQUET-679 and squashes the following commits:

33fc780 [revaliu] PARQUET-679: refactor too long line
057a84a [revaliu] PARQUET-679: fix "vector subscript out of range" debug assert in reader
and scanner tests
d50dea3 [revaliu] PARQUET-679: fix "vector iterator + offset out of range" debug assert in
memory-test


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/2398317d
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/2398317d
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/2398317d

Branch: refs/heads/master
Commit: 2398317d17453487f496c39bc4c89dbd9c17c1c9
Parents: e22a5cd
Author: revaliu <revaliu@microsoft.com>
Authored: Fri May 12 14:57:40 2017 +0200
Committer: Uwe L. Korn <uwe@apache.org>
Committed: Fri May 12 14:57:40 2017 +0200

----------------------------------------------------------------------
 src/parquet/column/scanner.h | 3 ++-
 src/parquet/util/memory.cc   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/2398317d/src/parquet/column/scanner.h
----------------------------------------------------------------------
diff --git a/src/parquet/column/scanner.h b/src/parquet/column/scanner.h
index 47daaed..75b08b6 100644
--- a/src/parquet/column/scanner.h
+++ b/src/parquet/column/scanner.h
@@ -104,7 +104,8 @@ class PARQUET_EXPORT TypedScanner : public Scanner {
   bool NextLevels(int16_t* def_level, int16_t* rep_level) {
     if (level_offset_ == levels_buffered_) {
       levels_buffered_ = typed_reader_->ReadBatch(
-          batch_size_, &def_levels_[0], &rep_levels_[0], values_, &values_buffered_);
+          batch_size_, def_levels_.data(), rep_levels_.data(),
+          values_, &values_buffered_);
 
       value_offset_ = 0;
       level_offset_ = 0;

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/2398317d/src/parquet/util/memory.cc
----------------------------------------------------------------------
diff --git a/src/parquet/util/memory.cc b/src/parquet/util/memory.cc
index f1fcc75..07dd20e 100644
--- a/src/parquet/util/memory.cc
+++ b/src/parquet/util/memory.cc
@@ -249,7 +249,7 @@ void ChunkedAllocator::AcquireData(ChunkedAllocator* src, bool keep_current)
{
   total_reserved_bytes_ += total_transfered_bytes;
 
   // insert new chunks after current_chunk_idx_
-  auto insert_chunk = chunks_.begin() + current_chunk_idx_ + 1;
+  auto insert_chunk = chunks_.begin() + (current_chunk_idx_ + 1);
   chunks_.insert(insert_chunk, src->chunks_.begin(), end_chunk);
   src->chunks_.erase(src->chunks_.begin(), end_chunk);
   current_chunk_idx_ += num_acquired_chunks;


Mime
View raw message