fanruan-tuco commented on code in PR #55629:
URL: https://github.com/apache/arrow/pull/55629#discussion_r4663556311
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -1338,7 +1345,14 @@ class TypedColumnWriterImpl : public ColumnWriterImpl,
"Content-defined chunking is not supported in WriteBatch() or "
"WriteBatchSpaced(), use WriteArrow() instead.");
}
- return WriteBatchInternal(num_values, def_levels, rep_levels, values);
+ if (closed_ || failed_) {
+ throw ParquetException("Cannot write to a closed or failed column
writer");
+ }
+ failed_ = true;
Review Comment:
I've considered using macros, writing it is rather uncomfortable; your
strategy is better and more engineering than macros
--
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]