Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PointKernel committed Mar 8, 2022
1 parent 2467672 commit 3113ede
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cpp/src/io/parquet/compact_protocol_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,10 @@ template <typename T>
inline void CompactProtocolFieldWriter::field_struct(int field, const T& val)
{
put_field_header(field, current_field_value, ST_FLD_STRUCT);
// write the struct if it's not empty
if constexpr (not std::is_empty_v<T>) {
writer.write(val);
}
// Otherwise, add a stop field
else {
put_byte(0);
writer.write(val); // write the struct if it's not empty
} else {
put_byte(0); // otherwise, add a stop field
}
current_field_value = field;
}
Expand Down

0 comments on commit 3113ede

Please sign in to comment.