You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by GitBox <gi...@apache.org> on 2023/01/03 17:44:24 UTC

[GitHub] [arrow] tachyonwill opened a new issue, #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

tachyonwill opened a new issue, #15173:
URL: https://github.com/apache/arrow/issues/15173

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   ByteStreamSplitDecoder is initialized https://github.com/apache/arrow/blob/ceec7950e8c6e9a63f48d27c284c56938df3598d/cpp/src/parquet/encoding.cc#L2908 with a `num_values` parameter. The code assumes that this is the number of non-null values but in fact this is the value count including nulls. This breaks decoding in two ways. The first is the check `num_values * static_cast<int64_t>(sizeof(T)) > len` which won't be true if there are nulls. The second is that `num_values` is used as the stride parameter for decoding the stream instead of the non-null value count, so even if the aforementioned check is removed, the decoding will be wrong.  The java code in parquet-mr seems to have similar problems...
   
   I think there are two different approaches to fixing this. The first is to ascertain the non-null value count before decoding; with V2 page headers this can be determined from the header but for V1 headers this might require decoding all levels first. The second approach is to assume that the length of the values data is what it is and divide this length by the element size to get the stride. This seems to be compatible with the way both the C++ and Java encoders write these pages but it probably should be specified in the specification that there is no padding / extraneous byte at the end of the page.
   
   ### Component(s)
   
   C++, Parquet


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wjones127 commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by "wjones127 (via GitHub)" <gi...@apache.org>.
wjones127 commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1405614356

   > The second approach is to assume that the length of the values data is what it is and divide this length by the element size to get the stride. This seems to be compatible with the way both the C++ and Java encoders write these pages but it probably should be specified in the specification that there is no padding / extraneous byte at the end of the page.
   
   It seems like this is worth proposing on the Parquet dev mailing list. If the two main implementations already write it this way, then there probably isn't much risk in updating the spec.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wgtmac commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1425923952

   I created https://github.com/apache/parquet-format/pull/192 and feel free to comment on it. @tachyonwill @mapleFU 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1381287613

   ```c++
     // The total number of values stored in the data page. This is the maximum of
     // the number of encoded definition levels or encoded values. For
     // non-repeated, required columns, this is equal to the number of encoded
     // values. For repeated or optional values, there may be fewer data values
     // than levels, and this tells you how many encoded levels there are in that
     // case.
     int64_t num_buffered_values_;
   ```
   
   Seems it's only used as "values upper bounds", some encoding mark value number in it's header, like `DELTA_BINARY_PACKED`, but `PLAIN` or `BYTE_STREAM_SPLIT` would not use it.
   
   In most of case it's ok, because in `TypedColumnReaderImpl`, the reading always be like:
   
   ```c++
   template <typename DType>
   int64_t TypedColumnReaderImpl<DType>::ReadBatch(int64_t batch_size, int16_t* def_levels,
                                                   int16_t* rep_levels, T* values,
                                                   int64_t* values_read) {
     // ..
     ReadLevels(batch_size, def_levels, rep_levels, &num_def_levels, &values_to_read);
   
     *values_read = this->ReadValues(values_to_read, values);
     int64_t total_values = std::max<int64_t>(num_def_levels, *values_read);
     int64_t expected_values =
         std::min(batch_size, this->num_buffered_values_ - this->num_decoded_values_);
     if (total_values == 0 && expected_values > 0) {
       std::stringstream ss;
       ss << "Read 0 values, expected " << expected_values;
       ParquetException::EofException(ss.str());
     }
     this->ConsumeBufferedValues(total_values);
   
     return total_values;
   }
   ```
   
   And code here:
   
   ```c++
   template <typename DType>
   void ByteStreamSplitDecoder<DType>::SetData(int num_values, const uint8_t* data,
                                               int len) {
     DecoderImpl::SetData(num_values, data, len);
     if (num_values * static_cast<int64_t>(sizeof(T)) > len) {
       throw ParquetException("Data size too small for number of values (corrupted file?)");
     }
     num_values_in_buffer_ = num_values;
   }
   ```
   
   The checking is added by @pitrou in this patch: https://github.com/apache/arrow/commit/faf9bc011cb452e9def7dcd63dd3a0f6ec823534 . And I don't know the context for it. At least it help us find that problem.
   
   And `stride` here would be wrong:
   
   ```c++
   template <typename T>
   void inline ByteStreamSplitDecode(const uint8_t* data, int64_t num_values, int64_t stride,
                                     T* out) {
   #if defined(ARROW_HAVE_SIMD_SPLIT)
     return ByteStreamSplitDecodeSimd(data, num_values, stride, out);
   #else
     return ByteStreamSplitDecodeScalar(data, num_values, stride, out);
   #endif
   }
   ```
   
   Because:
   
   ```c++
   template <typename DType>
   int ByteStreamSplitDecoder<DType>::Decode(T* buffer, int max_values) {
     const int values_to_decode = std::min(num_values_, max_values);
     const int num_decoded_previously = num_values_in_buffer_ - num_values_;
     const uint8_t* data = data_ + num_decoded_previously;
   
     ::arrow::util::internal::ByteStreamSplitDecode<T>(data, values_to_decode,
                                                       num_values_in_buffer_, buffer);
     num_values_ -= values_to_decode;
     len_ -= sizeof(T) * values_to_decode;
     return values_to_decode;
   }
   ```
   
   Here it use `num_values_in_buffer_`?
   
   I would try to reproduce this later. I write a DecodeSpace, but didn't reproduce that bug. My current code is:
   
   ```c++
     void CheckRoundtripSpaced(const uint8_t* valid_bits,
                               int64_t valid_bits_offset) override {
       std::cout << "CheckRoundtripSpaced for BYTE_STREAM_SPLIT called" << std::endl;
       auto encoder =
           MakeTypedEncoder<Type>(Encoding::BYTE_STREAM_SPLIT, false, descr_.get());
       auto decoder = MakeTypedDecoder<Type>(Encoding::BYTE_STREAM_SPLIT, descr_.get());
       int null_count = 0;
       for (auto i = 0; i < num_values_; i++) {
         if (!bit_util::GetBit(valid_bits, valid_bits_offset + i)) {
           null_count++;
         }
       }
   
       encoder->PutSpaced(draws_, num_values_, valid_bits, valid_bits_offset);
       encode_buffer_ = encoder->FlushValues();
       decoder->SetData(num_values_ - null_count, encode_buffer_->data(),
                        static_cast<int>(encode_buffer_->size()));
       auto values_decoded = decoder->DecodeSpaced(decode_buf_, num_values_, null_count,
                                                   valid_bits, valid_bits_offset);
       ASSERT_EQ(num_values_, values_decoded);
       ASSERT_NO_FATAL_FAILURE(VerifyResultsSpaced<c_type>(
           decode_buf_, draws_, num_values_, valid_bits, valid_bits_offset));
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1396461820

   https://github.com/apache/arrow/issues/15173#issuecomment-1385858560 can be reproduce like this:
   
   ```
   diff --git a/cpp/examples/parquet/low_level_api/reader_writer.cc b/cpp/examples/parquet/low_level_api/reader_writer.cc
   index 09af32289..ae1231911 100644
   --- a/cpp/examples/parquet/low_level_api/reader_writer.cc
   +++ b/cpp/examples/parquet/low_level_api/reader_writer.cc
   @@ -42,7 +42,7 @@
     * https://github.com/apache/parquet-format/blob/master/LogicalTypes.md
     **/
    
   -constexpr int NUM_ROWS_PER_ROW_GROUP = 500;
   +constexpr int NUM_ROWS_PER_ROW_GROUP = 2500;
    const char PARQUET_FILENAME[] = "parquet_cpp_example.parquet";
    
    int main(int argc, char** argv) {
   @@ -63,7 +63,12 @@ int main(int argc, char** argv) {
    
        // Add writer properties
        parquet::WriterProperties::Builder builder;
   -    builder.compression(parquet::Compression::SNAPPY);
   +    builder.compression(parquet::Compression::SNAPPY)
   +        ->encoding("schema.float_field", parquet::Encoding::BYTE_STREAM_SPLIT)
   +        ->encoding("schema.double_field", parquet::Encoding::BYTE_STREAM_SPLIT)
   +        ->encoding("float_field", parquet::Encoding::BYTE_STREAM_SPLIT)
   +        ->encoding("double_field", parquet::Encoding::BYTE_STREAM_SPLIT)
   +        ->disable_dictionary();
        std::shared_ptr<parquet::WriterProperties> props = builder.build();
    
        // Create a ParquetFileWriter instance
   @@ -119,7 +124,12 @@ int main(int argc, char** argv) {
            static_cast<parquet::FloatWriter*>(rg_writer->NextColumn());
        for (int i = 0; i < NUM_ROWS_PER_ROW_GROUP; i++) {
          float value = static_cast<float>(i) * 1.1f;
   -      float_writer->WriteBatch(1, nullptr, nullptr, &value);
   +      int16_t definition_level = 1;
   +      int16_t repetition_level = 0;
   +      if (i % 3 == 0) {
   +        definition_level = 0;
   +      }
   +      float_writer->WriteBatch(1, &definition_level, &repetition_level, &value);
        }
    
        // Write the Double column
   @@ -127,7 +137,12 @@ int main(int argc, char** argv) {
            static_cast<parquet::DoubleWriter*>(rg_writer->NextColumn());
        for (int i = 0; i < NUM_ROWS_PER_ROW_GROUP; i++) {
          double value = i * 1.1111111;
   -      double_writer->WriteBatch(1, nullptr, nullptr, &value);
   +      int16_t definition_level = 1;
   +      int16_t repetition_level = 0;
   +      if (i % 3 == 2) {
   +        definition_level = 0;
   +      }
   +      double_writer->WriteBatch(1, &definition_level, &repetition_level, &value);
        }
    
        // Write the ByteArray column. Make every alternate values NULL
   @@ -314,14 +329,19 @@ int main(int argc, char** argv) {
            float value;
            // Read one value at a time. The number of rows read is returned. values_read
            // contains the number of non-null rows
   -        rows_read = float_reader->ReadBatch(1, nullptr, nullptr, &value, &values_read);
   -        // Ensure only one value is read
   -        assert(rows_read == 1);
   -        // There are no NULL values in the rows written
   -        assert(values_read == 1);
   -        // Verify the value written
   -        float expected_value = static_cast<float>(i) * 1.1f;
   -        assert(value == expected_value);
   +        rows_read = float_reader->ReadBatch(1, &definition_level, nullptr, &value, &values_read);
   +        if (i % 3 != 0) {
   +          assert(definition_level == 1);
   +          // Ensure only one value is read
   +          assert(rows_read == 1);
   +          // There are no NULL values in the rows written
   +          assert(values_read == 1);
   +          // Verify the value written
   +          float expected_value = static_cast<float>(i) * 1.1f;
   +          assert(value == expected_value);
   +        } else {
   +          assert(definition_level == 0);
   +        }
            i++;
          }
    
   @@ -335,14 +355,19 @@ int main(int argc, char** argv) {
            double value;
            // Read one value at a time. The number of rows read is returned. values_read
            // contains the number of non-null rows
   -        rows_read = double_reader->ReadBatch(1, nullptr, nullptr, &value, &values_read);
   -        // Ensure only one value is read
   -        assert(rows_read == 1);
   -        // There are no NULL values in the rows written
   -        assert(values_read == 1);
   -        // Verify the value written
   -        double expected_value = i * 1.1111111;
   -        assert(value == expected_value);
   +        rows_read = double_reader->ReadBatch(1, &definition_level, nullptr, &value, &values_read);
   +        if (i % 3 != 2) {
   +          assert(definition_level == 1);
   +          // Ensure only one value is read
   +          assert(rows_read == 1);
   +          // There are no NULL values in the rows written
   +          assert(values_read == 1);
   +          // Verify the value written
   +          double expected_value = i * 1.1111111;
   +          assert(value == expected_value);
   +        } else {
   +          assert(definition_level == 0);
   +        }
            i++;
          }
    
   diff --git a/cpp/examples/parquet/low_level_api/reader_writer.h b/cpp/examples/parquet/low_level_api/reader_writer.h
   index ed8e74653..056850c89 100644
   --- a/cpp/examples/parquet/low_level_api/reader_writer.h
   +++ b/cpp/examples/parquet/low_level_api/reader_writer.h
   @@ -47,10 +47,10 @@ static std::shared_ptr<GroupNode> SetupSchema() {
      fields.push_back(PrimitiveNode::Make("int96_field", Repetition::REQUIRED, Type::INT96,
                                           ConvertedType::NONE));
    
   -  fields.push_back(PrimitiveNode::Make("float_field", Repetition::REQUIRED, Type::FLOAT,
   +  fields.push_back(PrimitiveNode::Make("float_field", Repetition::OPTIONAL, Type::FLOAT,
                                           ConvertedType::NONE));
    
   -  fields.push_back(PrimitiveNode::Make("double_field", Repetition::REQUIRED, Type::DOUBLE,
   +  fields.push_back(PrimitiveNode::Make("double_field", Repetition::OPTIONAL, Type::DOUBLE,
                                           ConvertedType::NONE));
    
      // Create a primitive node named 'ba_field' with type:BYTE_ARRAY, repetition:OPTIONAL
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1385858560

   Hi pitrou, I've reproduce it in `examples`, you can take a look at https://github.com/mapleFU/arrow/tree/parquet/fix-decode-bug and this commit: https://github.com/mapleFU/arrow/commit/655cd2a2ea3acee6bdc1d14bd87a2ec87411f108
   @pitrou 
   I think I can use the code below to fix it:
   
   ```c++
     // Get a decoder object for this page or create a new decoder if this is the
     // first page with this encoding.
     void InitializeDataDecoder(const DataPage& page, int64_t levels_byte_size) {
       auto it = decoders_.find(static_cast<int>(encoding));
       if (it != decoders_.end()) {
         DCHECK(it->second.get() != nullptr);
         current_decoder_ = it->second.get();
       } else {
         switch (encoding) {
          ...
           case Encoding::DELTA_LENGTH_BYTE_ARRAY: {
             auto decoder =
                 MakeTypedDecoder<DType>(Encoding::DELTA_LENGTH_BYTE_ARRAY, descr_);
             current_decoder_ = decoder.get();
             decoders_[static_cast<int>(encoding)] = std::move(decoder);
   +          // recounting buffered values here
             break;
           }
   
           default:
             throw ParquetException("Unknown encoding type.");
         }
       }
       current_encoding_ = encoding;
       current_decoder_->SetData(static_cast<int>(num_buffered_values_), buffer,
                                 static_cast<int>(data_size));
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1381335403

   @pitrou @wjones127 What do you think of this?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1426618983

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] wjones127 closed issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by "wjones127 (via GitHub)" <gi...@apache.org>.
wjones127 closed issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls
URL: https://github.com/apache/arrow/issues/15173


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1426613110

   This patch is merged: https://github.com/apache/parquet-format/pull/192
   According to this patch, BYTE_STREAM_SPLIT should have zero padding. Now I can fix this issue


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by "mapleFU (via GitHub)" <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1399158204

   @wjones127 @emkornfield Hi, what do you think of this problem? Should we assure there are no padding? Or just use method like https://github.com/apache/arrow/issues/15173#issuecomment-1385858560 ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1383987606

   > I'm not sure what to say. If the decoder doesn't handle nulls correctly, I expect it to be easily reproducible using some sample input data.
   
   I mean, "decoder" (or class in `encoding.cc`) doesn't know what's null or what's null, they just accept "batch read value" from `ColumnReaderImpl`. `ColumnReader` would correctly handle the nulls.
   
   I'll try to reproduce it later after I go home


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1387256970

   By the way, I think this problem is a bit like https://issues.apache.org/jira/browse/PARQUET-2222 ...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] mapleFU commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
mapleFU commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1381335774

   Reproduce the another problem with the code below:
   
   ```c++
     void CheckRoundtripSpaced(const uint8_t* valid_bits,
                               int64_t valid_bits_offset) override {
       auto encoder =
           MakeTypedEncoder<Type>(Encoding::BYTE_STREAM_SPLIT, false, descr_.get());
       auto decoder = MakeTypedDecoder<Type>(Encoding::BYTE_STREAM_SPLIT, descr_.get());
       int null_count = 0;
       for (auto i = 0; i < num_values_; i++) {
         if (!bit_util::GetBit(valid_bits, valid_bits_offset + i)) {
           null_count++;
         }
       }
   
       encoder->PutSpaced(draws_, num_values_, valid_bits, valid_bits_offset);
       encode_buffer_ = encoder->FlushValues();
       decoder->SetData(num_values_, encode_buffer_->data(),
                        static_cast<int>(encode_buffer_->size()));
       auto values_decoded = decoder->DecodeSpaced(decode_buf_, num_values_ - null_count, null_count,
                                                   valid_bits, valid_bits_offset);
       ASSERT_EQ(num_values_ - null_count, values_decoded);
       ASSERT_NO_FATAL_FAILURE(VerifyResultsSpaced<c_type>(
           decode_buf_, draws_, num_values_ - null_count, valid_bits, valid_bits_offset));
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
pitrou commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1383942604

   @mapleFU I'm not sure what to say. If the decoder doesn't handle nulls correctly, I expect it to be easily reproducible using some sample input data.
   
   For example, use `ArrayFromJSON` to generate some float data with nulls, and try to roundtrip through the encoder and then decoder.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] tachyonwill commented on issue #15173: [Parquet][C++] ByteStreamSplitDecoder broken in presence of nulls

Posted by GitBox <gi...@apache.org>.
tachyonwill commented on issue #15173:
URL: https://github.com/apache/arrow/issues/15173#issuecomment-1384403268

   [Demonstration file](https://github.com/tachyonwill/arrow-testing/raw/byte_stream_null/data/parquet/byte_stream_null.parquet)
   col7 has three levels/values but one of them is null. Attempting to read it will produce the `Data size too small for number of values (corrupted file?)` error.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org