abstractdog commented on PR #6835:
URL: https://github.com/apache/hive/pull/6835#issuecomment-7372016648

   > ### What changes were proposed in this pull request?
   > * `ParquetVectorUpdater` / `ParquetVectorUpdaterFactory` replace the 
per-value virtual-dispatch reader: definition levels and values decode a batch 
per call, for PLAIN and dictionary pages (int, bigint, float, double, decimal, 
date, boolean, char, varchar, string, binary)
   > * A dictionary is flattened once per column chunk; a string row becomes a 
reference into it instead of a copy
   > * decimal64 fast path; dictionary-aware single-string-key fast path
   > * BIT_PACKED definition levels and timestamps keep the per-value path 
(timestamps: [HIVE-30116](https://issues.apache.org/jira/browse/HIVE-30116))
   > * A batch of equal values is repeating only when their bits are equal: 0.0 
and -0.0 compare equal as doubles, and the per-value reader reads a PLAIN batch 
holding both as one repeated value
   > 
   > ### Why are the changes needed?
   > Performance: the per-value reader makes a virtual call per value and 
copies every string. Local, 20M store_sales-shaped rows: decode 72.2 -> 15.7 
ns/row (4.6x), full reader 89.9 -> 28.3 ns/row (3.2x).
   > 
   > ### Does this PR introduce _any_ user-facing change?
   > A vectorized read of a PLAIN-encoded DOUBLE or FLOAT column whose batch 
holds both 0.0 and -0.0 now returns each value with its sign; master returns 
the first row's sign for every row of such a batch (and an `INSERT ... SELECT` 
from it writes that value). Otherwise no.
   > 
   > ### How was this patch tested?
   > * `TestVectorizedColumnReader`, 
`TestVectorizedDictionaryEncodingColumnReader`: every type read through both 
paths
   > * `TestVectorizedRleValuesReader`, `TestDictionaryValues`
   > * `parquet_signed_zero.q`: 2,000 rows alternating 0.0 and -0.0, DOUBLE and 
FLOAT, PLAIN and dictionary pages, read vectorized and row by row (master: 
vectorized PLAIN reads 2,000 x -0.0)
   > * `parquet_vectorization_0.q.out`, `parquet_vectorization_not.q.out`: the 
last digits of variance and stddev (summation order)
   > * The Parquet qtests of `TestMiniLlapLocalCliDriver` (118) pass locally; 
`materialized_view_parquet.q` differs in `numFiles` locally on master as well
   
   The type list "(int, bigint, float, double, decimal, date, boolean, char, 
varchar, string, binary)" reads as if all of these are bulk-read on PLAIN 
pages. Two clarifications would help:
   
   - **decimal**: only decimal64 at the file scale (`Decimal64Updater`) is 
bulk. HiveDecimal (precision > 18) and scale-evolved decimals still read PLAIN 
pages per value.
   - **TINYINT / SMALLINT** aren't bulk (they keep the per-value range check), 
and Hive writes them as INT32 `INT_8` / `INT_16`, so it's easy to assume "int" 
covers them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to