|
| 1 | +#### Overview |
| 2 | + |
| 3 | +Apache Parquet is an open source, column-oriented data file format designed for |
| 4 | +efficient data storage and retrieval. Together with Apache Arrow for in-memory data, |
| 5 | +it has become for the *de facto* standard for efficient columnar analytics. |
| 6 | + |
| 7 | +While Parquet and Arrow are most often used together, they have incompatible physical |
| 8 | +representations of data with optional values: data where some values can be |
| 9 | +missing or "null". While Arrow uses a validity bitmap for each schema field and nesting level, |
| 10 | +Parquet condenses that information in a more sophisticated structure called definition |
| 11 | +levels (borrowing ideas from Google's Dremel project). |
| 12 | + |
| 13 | +Converting between those two representations is non-trivial and often turns out |
| 14 | +a performance bottleneck when reading a Parquet file as in-memory Arrow data. |
| 15 | +Even columns that practically do not contain any nulls can still suffer from it if |
| 16 | +the data is declared nullable (optional) at the schema level. |
| 17 | + |
| 18 | +We propose to optimize the conversion of null values from Parquet in Arrow C++ |
| 19 | +for flat (non-nested) data: |
| 20 | + |
| 21 | +1. decoding Parquet definition levels directly into a Arrow validity bitmap, rather than using an |
| 22 | + intermediate representation as 16-bit integers; |
| 23 | + |
| 24 | +2. avoiding decoding definition levels entirely when a data page's statistics shows |
| 25 | + it cannot contain any nulls (or, conversely, when it cannot contain any non-null values). |
| 26 | + |
| 27 | +As a subsequent task, these optimizations may be extended so as to apply to schemas |
| 28 | +with moderate amounts of nesting. |
| 29 | + |
| 30 | +This work will benefit to applications using Arrow C++ or any of its language |
| 31 | +bindings (such as PyArrow, R-Arrow...). |
| 32 | + |
| 33 | +Depending on the typology of Parquet data, this could make Parquet reading 2x |
| 34 | +faster, even more in some cases. If you are unsure whether your workload could |
| 35 | +benefit, we can discuss this based on sample Parquet files you provide us. |
| 36 | + |
| 37 | +##### Are you interested in this project? Either entirely or partially, contact us for more information on how to help us fund it |
0 commit comments