ClientRequestState::FetchRowsInternal is hitting a DCHECK when running hs2/test_fetch_first.py::TestFetchFirst::test_query_stmts_v1 and other hs2 tests:
This is firing because the size of a row increases when it is copied into the result set. The size increases because the capacity of the string is increasing when it is copied. In the row passed in, one field has a string with size=29, capacity=29. After it is copied into the result set, it has size=29, capacity=30. Since we count the string memory usage based on capacity, the memory usage has gone up.
In general, the behavior of capacity() is unspecified, and we can't rely on a specific semantic.