From 3113ede5a0482896ee4ac44403f2e02a8ff4dc85 Mon Sep 17 00:00:00 2001 From: Yunsong Wang Date: Tue, 8 Mar 2022 14:55:18 -0500 Subject: [PATCH] Update comments --- cpp/src/io/parquet/compact_protocol_writer.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/cpp/src/io/parquet/compact_protocol_writer.cpp b/cpp/src/io/parquet/compact_protocol_writer.cpp index f0c288a36bc..9355ef4fec8 100644 --- a/cpp/src/io/parquet/compact_protocol_writer.cpp +++ b/cpp/src/io/parquet/compact_protocol_writer.cpp @@ -282,13 +282,10 @@ template 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) { - 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; }