rok commented on code in PR #13947:
URL: https://github.com/apache/arrow/pull/13947#discussion_r965195239


##########
cpp/src/parquet/column_writer.cc:
##########
@@ -2050,6 +2050,7 @@ Status TypedColumnWriterImpl<FLBAType>::WriteArrowDense(
     WRITE_SERIALIZE_CASE(FIXED_SIZE_BINARY, FixedSizeBinaryType, FLBAType)
     WRITE_SERIALIZE_CASE(DECIMAL128, Decimal128Type, FLBAType)
     WRITE_SERIALIZE_CASE(DECIMAL256, Decimal256Type, FLBAType)
+    WRITE_SERIALIZE_CASE(HALF_FLOAT, FixedSizeBinaryType, FLBAType)

Review Comment:
   This would resolve the segfault but doesn't really feel elegant.
   ```suggestion
       case ::arrow::Type::HALF_FLOAT: {
         auto array_data = array.data();
         const auto& arr = ::arrow::FixedSizeBinaryArray(
             ::arrow::fixed_size_binary(2), array.length(), 
array_data->buffers[1],
             array_data->buffers[0], array.null_count(), array.offset());
         return WriteArrowSerialize<FLBAType, ::arrow::FixedSizeBinaryType>(
             arr, num_levels, def_levels, rep_levels, ctx, this, 
maybe_parent_nulls);
       }
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to