Skip to content

Commit

Permalink
Add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Feb 12, 2025
1 parent 2d1965f commit b4eb09f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpp/src/arrow/csv/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,10 @@ class ResizableValueDescWriter : public ValueDescWriter<ResizableValueDescWriter
}
status_ &= std::move(resize_status);
}
// The `values_` pointer may have become invalid if the `Resize` call above failed.
// Note that ResizableValueDescWriter is less performance-critical than
// PresizedValueDescWriter, as it should only be called on the first line(s)
// of CSV data.
if (ARROW_PREDICT_TRUE(status_.ok())) {
values_[values_size_++] = v;
}
Expand Down

0 comments on commit b4eb09f

Please sign in to comment.