This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch branch-1.18.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 215b5ccba45f4227905b968476d44be486656958
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Feb 27 18:22:24 2025 -0800

    [cfile] fix result status handling
    
    This patch addresses sloppy result handling of functions/methods
    that return Status under the src/kudu/cfile directory.
    
    Change-Id: I2bbfc65ef4d2312ee5af04741d8cf179f2de2b9b
    Reviewed-on: http://gerrit.cloudera.org:8080/22641
    Tested-by: Alexey Serbin <[email protected]>
    Reviewed-by: Abhishek Chennaka <[email protected]>
    (cherry picked from commit 197005b5ec7fa535dce896d7b1ff12f8c3c66157)
    Reviewed-on: http://gerrit.cloudera.org:8080/22751
---
 src/kudu/cfile/binary_dict_block.cc | 2 +-
 src/kudu/cfile/index_block.cc       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/kudu/cfile/binary_dict_block.cc 
b/src/kudu/cfile/binary_dict_block.cc
index 74ca863ae..c860ef468 100644
--- a/src/kudu/cfile/binary_dict_block.cc
+++ b/src/kudu/cfile/binary_dict_block.cc
@@ -299,7 +299,7 @@ Status BinaryDictBlockDecoder::CopyNextAndEval(size_t* n,
   // Load the rows' codeword values into a buffer for scanning.
   BShufBlockDecoder<UINT32>* d_bptr = 
down_cast<BShufBlockDecoder<UINT32>*>(data_decoder_.get());
   codeword_buf_.resize(*n * sizeof(uint32_t));
-  d_bptr->CopyNextValuesToArray(n, codeword_buf_.data());
+  RETURN_NOT_OK(d_bptr->CopyNextValuesToArray(n, codeword_buf_.data()));
   Slice* out = reinterpret_cast<Slice*>(dst->data());
   for (size_t i = 0; i < *n; i++, out++) {
     // Check with the SelectionVectorView to see whether the data has already
diff --git a/src/kudu/cfile/index_block.cc b/src/kudu/cfile/index_block.cc
index c003d1e3e..6f2fab1dc 100644
--- a/src/kudu/cfile/index_block.cc
+++ b/src/kudu/cfile/index_block.cc
@@ -245,7 +245,7 @@ Status IndexBlockReader::ReadEntry(size_t idx,
 
   const uint8_t* ptr = nullptr;
   const uint8_t* limit = nullptr;
-  GetKeyPointer(idx, &ptr, &limit);
+  RETURN_NOT_OK(GetKeyPointer(idx, &ptr, &limit));
 
   ptr = SliceDecode(ptr, limit, key);
   if (PREDICT_FALSE(!ptr)) {

Reply via email to