spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakub Wozniak <>
Subject Very slow complex type column reads from parquet
Date Mon, 11 Jun 2018 13:16:21 GMT

We have stumbled upon a quite degraded performance when reading a complex (struct, array)
type columns stored in Parquet. 
A Parquet file is of around 600MB (snappy) with ~400k rows with a field of a complex type
{ f1: array of ints, f2: array of ints } where f1 array length is 50k elements. 
There are also other fields like entity_id: long, timestamp: long. 

A simple query that selects rows using predicates entity_id = X and timestamp >= T1 and
timestamp <= T2 plus takes 17 minutes to execute. 
If we remove the complex type columns from the query it is executed in a sub-second time.

Now when looking at the implementation of the Parquet datasource the Vectorized* classes are
used only if the read types are primitives. In other case the code falls back to the parquet-mr
default implementation. 
In the VectorizedParquetRecordReader there is a TODO to handle complex types that "should
be efficient & easy with codegen". 

For our CERN Spark usage the current execution times are pretty much prohibitive as there
is a lot of data stored as arrays / complex types… 
The file of 600 MB represents 1 day of measurements and our data scientists would like to
process sometimes months or even years of those.  

Could you please let me know if there is anybody currently working on it or maybe you have
it in a roadmap for the future? 
Or maybe you could give me some suggestions how to avoid / resolve this problem? I’m using
Spark 2.2.1. 

Best regards,
Jakub Wozniak

To unsubscribe e-mail:

View raw message