Skip to content

Commit

Permalink
[core] Add limit to bundle interface (apache#4115)
Browse files Browse the repository at this point in the history
  • Loading branch information
leaves12138 authored Sep 3, 2024
1 parent c574ae3 commit 6b8d72b
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ public void write(T record) throws IOException {
}
}

@Override
public void writeBundle(BundleRecords bundle) throws IOException {
Preconditions.checkState(
simpleStatsExtractor != null,
"Can't write bundle without simpleStatsExtractor, we may lose all the statistical information");

super.writeBundle(bundle);
}

public SimpleColStats[] fieldStats() throws IOException {
Preconditions.checkState(closed, "Cannot access metric unless the writer is closed.");
if (simpleStatsExtractor != null) {
Expand Down

0 comments on commit 6b8d72b

Please sign in to comment.