'How to read parquet files into tables in Java using Apache Arrow?

I want to do the same like pq_table = pq.read_table(file_path) in pyarrow.

I tried Arrow 8.0.0 with the examples from here but it does not work. https://arrow.apache.org/cookbook/java/dataset.html#query-parquet-file

The forEachRemaining is missing in Arrow 8.0.0.

Context: I want to read sparse columns into CSR/BSR format for fast sequential access later.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source