You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Tim Armstrong (JIRA)" <ji...@apache.org> on 2018/03/15 21:07:00 UTC
[jira] [Created] (IMPALA-6678) Better estimate of per-column
compressed data size for low-NDV columns.
Tim Armstrong created IMPALA-6678:
-------------------------------------
Summary: Better estimate of per-column compressed data size for low-NDV columns.
Key: IMPALA-6678
URL: https://issues.apache.org/jira/browse/IMPALA-6678
Project: IMPALA
Issue Type: Sub-task
Components: Backend
Affects Versions: Not Applicable
Reporter: Tim Armstrong
Assignee: Tim Armstrong
In the previous IMPALA-4835 patch, we assumed that the "ideal" memory per Parquet column was 3 * 8MB, except when the total size of the file capped the total amount of memory we might use. This is often an overestimate, particular for smaller files, files with large numbers of columns, and highly compressible data.
We could do something smarter for Parquet given file sizes, per-partition row count, and column NDV. We can estimate row count per file by dividing the row count by the file size and estimate bytes per value with two methods:
* For fixed width types, estimating bytes per value based on the type width. We don't know what the physical parquet type is necessarily, but it seems reasonable to estimate based on the type declared in the table.
* log2(ndv) / 8, assuming that dictionary compression or general-purpose compression will kick in.
See https://docs.google.com/document/d/1kR0zfevNNUJom3sH1XmposacVZ-QALan7NSwnR5CkSA/edit#heading=h.a2b8e8h5a6en for some analysis.
I looked at encoded lineitem data and saw that many of the scanned columns were 3-4MB in size and that we could have estimated an ideal size < 24MB per column based on the above heuristics.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)