AdamGS opened a new pull request, #22714: URL: https://github.com/apache/datafusion/pull/22714
## Which issue does this PR close? - Closes #22713. ## Rationale for this change Fixes a bug with `avg` that currently prevents us from running TPC-DS q1. I think that this issues is masked by Parquet because the current implementations infers that columns as a Decimal128. ## What changes are included in this PR? 1. Mark Decimal32/64 as `R` in sqllogictest, like the bigger decimal types, and fixes some tests that used `?`. 2. Adds a test for decimal32 overflow 3. `DecimalAvgAccumulator` now takes another type to hold its inner sum accumulator, which can be different than the input/output type. 4. Decimal32 and Decimal 64 use i64 and i128 (respectively) to prevent an overflow (should i128 use i256 here?). 5. Adds some unit tests for the `AVG` impl building blocks. ## Are these changes tested? Additional SLT test that would've overflowed internally, and more focused unit tests for `AvgGroupsAccumulator` ## Are there any user-facing changes? None, just more code that doesn't currently work and will work now. -- 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]
