Gabriel39 opened a new pull request, #66379:
URL: https://github.com/apache/doris/pull/66379

   ## Proposed changes
   
   - Decode same-scale Parquet `FIXED_LEN_BYTE_ARRAY` decimals with an 
`int32_t`, `int64_t`, or `Int128` source selected from the physical width 
instead of always using `Int256`.
   - Use unaligned full-width big-endian loads for 4-, 8-, and 16-byte values, 
while preserving sign extension for shorter widths.
   - Validate the target decimal precision before narrowing, preserve 
permissive/strict conversion behavior, and keep rescaling and wider values on 
the existing `Int256` path.
   - Add regression coverage for positive and negative precision boundaries, 
shorter signed inputs, strict rollback, permissive null marking, and the 
complete int32 source domain.
   
   ## Validation
   
   - ASAN BE unit tests: 8 tests from `DataTypeSerDeParquetTest` passed.
   - Release microbenchmark: 65,536 values per iteration through 
`DataTypeDecimalSerDe::read_column_from_parquet`, pinned to one CPU. Each stage 
used 3 warmups followed by 10 repetitions in ABBA order.
   
   | Target / physical width | Before median CPU | After median CPU | Speedup | 
CPU reduction |
   | --- | ---: | ---: | ---: | ---: |
   | Decimal32 / 4 bytes | 1,359,514 ns | 88,527 ns | 15.36x | 93.49% |
   | Decimal64 / 8 bytes | 1,634,757 ns | 90,609 ns | 18.04x | 94.46% |
   | Decimal128 / 16 bytes | 2,206,272 ns | 152,823 ns | 14.44x | 93.07% |
   
   The benchmark host was heavily loaded and CPU frequency scaling was enabled, 
so the exact ratios are noisy. However, the before/after median ranges did not 
overlap in any ABBA stage. A final optimized-build smoke run measured median 
CPU times of 95,077 ns, 94,635 ns, and 145,417 ns with CPU CVs of 0.41%, 1.76%, 
and 0.64%, respectively.


-- 
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