I use the following code sequence
val obs = spark.read.parquet("s3://xxxx/parquettests/by_pat/")
val single = obs.filter($"pat" === "abcd")
single.explain
and I get back an execution plan with predicate pushdown
+- Filter (isnotnull(pat#930) && (pat#930 = abcd))
+- FileScan parquet PartitionFilters: [],
PushedFilters: [IsNotNull(pat), EqualTo(pat,abcd)]
The execution time of this (200 files with 3MB each, hash partitioned by "pat") is 32 secs.
Given that pat=abcd is contained in a single file only, that is 32 secs of reading a 3MB file plus skipping all others. Sounds a lot.
I have checked with the parquet-tools on of those files and it says PLAIN_DICTIONARY for the column, two pages both of "RLE:BIT_PACKED VLE:PLAIN [more] VC:21400".
Hence I suspect the dictionary compression to fall back to PLAIN but I am not sure and all my tries to change that did not work.
Thoughts?