Assume that I am doing something with each row of a Parquet file and each row has a field named myList
which is repeated and string. How can I get the last value in the myList
of each row?
This example uses a vector
to store all values.
Is there any convenient way to get the last value of the repeated field in each row directly?
My code is like this:
auto chunk_array = table->GetColumnByName(myList);
auto list = std::static_pointer_cast<arrow::ListArray>(chunk_array->chunk(0));
for (int cur_row = 0; cur_row < table->num_rows(); ++cur_row) {
//to get the last value of myList in current row
}
thanks~