Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleFU committed Nov 11, 2024
1 parent 22030db commit 505e23b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cpp/src/parquet/bloom_filter_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,15 @@ void BloomFilterBuilderImpl::WriteTo(::arrow::io::OutputStream* sink,
if (ARROW_PREDICT_FALSE(filter == nullptr)) {
throw ParquetException("Bloom filter state is invalid for column ", column_id);
}
if (ARROW_PREDICT_FALSE(column_id < 0 || column_id >= num_columns)) {
throw ParquetException("Invalid column ordinal when serailizing: ", column_id);
}
PARQUET_ASSIGN_OR_THROW(int64_t offset, sink->Tell());
filter->WriteTo(sink);
PARQUET_ASSIGN_OR_THROW(int64_t pos, sink->Tell());
if (pos - offset > std::numeric_limits<int32_t>::max()) {
throw ParquetException("Bloom filter is too large to be serialized.");
throw ParquetException("Bloom filter is too large to be serialized, size: ",
pos - offset);
}
locations[column_id] = IndexLocation{offset, static_cast<int32_t>(pos - offset)};
}
Expand Down

0 comments on commit 505e23b

Please sign in to comment.