wjones127 commented on code in PR #34096:
URL: https://github.com/apache/arrow/pull/34096#discussion_r1101910229
##########
cpp/src/parquet/column_writer.cc:
##########
@@ -854,8 +858,21 @@ void ColumnWriterImpl::AddDataPage() {
InitSinks();
num_buffered_values_ = 0;
num_buffered_encoded_values_ = 0;
+ num_buffered_rows_ = 0;
}
+namespace {
+
+int32_t safe_cast_64_to_32(int64_t value) {
+ if (value > std::numeric_limits<int32_t>::max() ||
+ value < std::numeric_limits<int32_t>::min()) {
+ throw ParquetException("Cannot cast ", value, " to int32_t");
+ }
+ return static_cast<int32_t>(value);
+}
Review Comment:
Is this necessary? Is it even possible to write more than
`std::numeric_limits<int32_t>::max()` values to a row group in 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]