You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2021/07/20 11:25:19 UTC

[arrow-rs] branch master updated: Update triplet.rs (#556)

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

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/master by this push:
     new 03269aa  Update triplet.rs (#556)
03269aa is described below

commit 03269aafd9626ae1b2981f4a03d802687de9a826
Author: aiglematth <ai...@protonmail.com>
AuthorDate: Tue Jul 20 13:25:05 2021 +0200

    Update triplet.rs (#556)
    
    Update triplet.rs to support REPEATED field with null value at one time
---
 parquet/src/record/triplet.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/parquet/src/record/triplet.rs b/parquet/src/record/triplet.rs
index bb4f942..e8eeccb 100644
--- a/parquet/src/record/triplet.rs
+++ b/parquet/src/record/triplet.rs
@@ -136,7 +136,9 @@ impl TripletIter {
 
     /// Updates non-null value for current row.
     pub fn current_value(&self) -> Field {
-        assert!(!self.is_null(), "Value is null");
+        if self.is_null() {
+            return Field::Null;
+        }
         match *self {
             TripletIter::BoolTripletIter(ref typed) => {
                 Field::convert_bool(typed.column_descr(), *typed.current_value())