You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "AdamGS (via GitHub)" <gi...@apache.org> on 2026/06/02 12:18:04 UTC

[PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3361221264


##########
datafusion/functions-aggregate/src/average.rs:
##########
@@ -223,50 +233,48 @@ impl AggregateUDFImpl for Avg {
             match (&data_type, acc_args.return_type()) {
                 (Float64, Float64) => Ok(Box::<AvgAccumulator>::default()),
                 (
-                    Decimal32(sum_precision, sum_scale),
+                    Decimal32(_sum_precision, sum_scale),
                     Decimal32(target_precision, target_scale),
-                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal32Type> {
-                    sum: None,
-                    count: 0,
-                    sum_scale: *sum_scale,
-                    sum_precision: *sum_precision,
-                    target_precision: *target_precision,
-                    target_scale: *target_scale,
-                })),
+                ) => Ok(Box::new(DecimalAvgAccumulator::<
+                    Decimal32Type,
+                    Decimal64Type,
+                >::new(
+                    *sum_scale,
+                    DECIMAL64_MAX_PRECISION,
+                    *target_precision,
+                    *target_scale,
+                ))),
                 (
-                    Decimal64(sum_precision, sum_scale),
+                    Decimal64(_sum_precision, sum_scale),
                     Decimal64(target_precision, target_scale),
-                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal64Type> {
-                    sum: None,
-                    count: 0,
-                    sum_scale: *sum_scale,
-                    sum_precision: *sum_precision,
-                    target_precision: *target_precision,
-                    target_scale: *target_scale,
-                })),
+                ) => Ok(Box::new(DecimalAvgAccumulator::<
+                    Decimal64Type,
+                    Decimal128Type,
+                >::new(
+                    *sum_scale,
+                    DECIMAL128_MAX_PRECISION,
+                    *target_precision,
+                    *target_scale,
+                ))),
                 (
                     Decimal128(sum_precision, sum_scale),
                     Decimal128(target_precision, target_scale),
-                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal128Type> {
-                    sum: None,
-                    count: 0,
-                    sum_scale: *sum_scale,
-                    sum_precision: *sum_precision,
-                    target_precision: *target_precision,
-                    target_scale: *target_scale,
-                })),
+                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal128Type>::new(

Review Comment:
   I think there is still a correctness issue here for Decimal128 AVG. The accumulator state remains `Decimal128Type`, and the new summation path uses `add_wrapping` (for example at lines 651, 672, and 947). That means intermediate overflow can still silently wrap before `DecimalAverager` gets a chance to run.
   
   For example, `avg(arrow_cast('999999999999999999999999999999.9999', 'Decimal128(34, 4)'))` over roughly 20,000 rows has a valid `Decimal128(38, 8)` result, but the intermediate Decimal128 sum exceeds `i128::MAX` and wraps along the way. At that point the average is already corrupted even though the final result would be representable.
   
   Could we widen the Decimal128 accumulation state (for example to Decimal256) or otherwise use checked/compensated accumulation so intermediate overflow does not invalidate averages whose final result fits?



##########
datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs:
##########
@@ -271,6 +271,8 @@ pub fn convert_schema_to_types(columns: &Fields) -> Vec<DFColumnType> {
             DataType::Float16
             | DataType::Float32
             | DataType::Float64
+            | DataType::Decimal32(_, _)

Review Comment:
   Small suggestion: mapping Decimal32/Decimal64 globally to `DFColumnType::Float` makes SLT comparisons approximate for these decimal types and could hide formatting or rounding regressions that would otherwise be caught.
   
   If the motivation is only the affected `power`/`round` queries, would it make sense to keep exact/text comparisons there instead? At minimum, it may be worth documenting why all Decimal32/64 SLT output is now treated approximately.



##########
datafusion/functions-aggregate/src/average.rs:
##########
@@ -365,17 +370,27 @@ impl AggregateUDFImpl for Avg {
                 Decimal32(_sum_precision, sum_scale),

Review Comment:
   Small refactoring suggestion: the Decimal32 and Decimal64 branches both follow the same pattern of creating a wider `DecimalAverager`, dividing by a widened count, and then `try_from`-ing back to the output native type.
   
   It might be nice to factor that into a helper such as `avg_decimal_with_wider_sum`. That would encode the widening invariant in one place and help keep the accumulator and group-accumulator paths aligned over time.



##########
datafusion/functions-aggregate/src/average.rs:
##########


Review Comment:
   I think the same issue still exists for `AVG(DISTINCT)` on decimals. The distinct path constructs `DecimalDistinctAvgAccumulator::<Decimal32Type>`, `Decimal64Type`, and `Decimal128Type`, and those accumulators still sum distinct values in the native type using wrapping arithmetic.
   
   `AVG(DISTINCT)` is still an average, so it can hit the same intermediate overflow problem whenever the average is representable but the sum is not. Could the widening/state-type fix be applied here as well? Otherwise it would be good to explicitly narrow the supported contract and add tests that document the unsupported behavior.



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "theirix (via GitHub)" <gi...@apache.org>.
theirix commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4983375617

   Thank you, @AdamGS ! I hope I can reuse the introduced functionality in #22042


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981354557

   ๐Ÿค– Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/22714#issuecomment-4981175249)
   
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
   
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   Architecture:                            aarch64
   CPU op-mode(s):                          64-bit
   Byte Order:                              Little Endian
   CPU(s):                                  16
   On-line CPU(s) list:                     0-15
   Vendor ID:                               ARM
   Model name:                              Neoverse-V2
   Model:                                   1
   Thread(s) per core:                      1
   Core(s) per cluster:                     16
   Socket(s):                               -
   Cluster(s):                              1
   Stepping:                                r0p1
   BogoMIPS:                                2000.00
   Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
   L1d cache:                               1 MiB (16 instances)
   L1i cache:                               1 MiB (16 instances)
   L2 cache:                                32 MiB (16 instances)
   L3 cache:                                80 MiB (1 instance)
   NUMA node(s):                            1
   NUMA node0 CPU(s):                       0-15
   Vulnerability Gather data sampling:      Not affected
   Vulnerability Indirect target selection: Not affected
   Vulnerability Itlb multihit:             Not affected
   Vulnerability L1tf:                      Not affected
   Vulnerability Mds:                       Not affected
   Vulnerability Meltdown:                  Not affected
   Vulnerability Mmio stale data:           Not affected
   Vulnerability Reg file data sampling:    Not affected
   Vulnerability Retbleed:                  Not affected
   Vulnerability Spec rstack overflow:      Not affected
   Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
   Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
   Vulnerability Spectre v2:                Mitigation; CSV2, BHB
   Vulnerability Srbds:                     Not affected
   Vulnerability Tsa:                       Not affected
   Vulnerability Tsx async abort:           Not affected
   Vulnerability Vmscape:                   Not affected
   ```
   
   </details>
   
   <details><summary>Details</summary>
   <p>
   
   ```
   Comparing HEAD and adamg_fix-avg-decimal-overflow
   --------------------
   Benchmark tpch_sf1.json
   --------------------
   โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
   โ”ƒ Query     โ”ƒ                           HEAD โ”ƒ adamg_fix-avg-decimal-overflow โ”ƒ    Change โ”ƒ
   โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
   โ”‚ QQuery 1  โ”‚ 38.58 / 39.63 ยฑ1.09 / 41.42 ms โ”‚ 38.66 / 40.18 ยฑ1.41 / 41.90 ms โ”‚ no change โ”‚
   โ”‚ QQuery 2  โ”‚ 19.16 / 19.53 ยฑ0.24 / 19.92 ms โ”‚ 19.52 / 19.83 ยฑ0.34 / 20.48 ms โ”‚ no change โ”‚
   โ”‚ QQuery 3  โ”‚ 33.83 / 35.55 ยฑ1.30 / 37.35 ms โ”‚ 33.46 / 34.50 ยฑ1.10 / 36.62 ms โ”‚ no change โ”‚
   โ”‚ QQuery 4  โ”‚ 17.70 / 18.26 ยฑ0.60 / 19.40 ms โ”‚ 17.62 / 17.82 ยฑ0.12 / 17.98 ms โ”‚ no change โ”‚
   โ”‚ QQuery 5  โ”‚ 38.15 / 39.55 ยฑ1.24 / 41.30 ms โ”‚ 37.61 / 40.71 ยฑ1.95 / 43.73 ms โ”‚ no change โ”‚
   โ”‚ QQuery 6  โ”‚ 16.36 / 16.77 ยฑ0.54 / 17.82 ms โ”‚ 16.39 / 16.63 ยฑ0.27 / 17.14 ms โ”‚ no change โ”‚
   โ”‚ QQuery 7  โ”‚ 43.86 / 45.93 ยฑ1.98 / 49.50 ms โ”‚ 43.39 / 45.58 ยฑ3.05 / 51.57 ms โ”‚ no change โ”‚
   โ”‚ QQuery 8  โ”‚ 43.17 / 43.52 ยฑ0.31 / 44.04 ms โ”‚ 43.09 / 43.46 ยฑ0.27 / 43.78 ms โ”‚ no change โ”‚
   โ”‚ QQuery 9  โ”‚ 49.84 / 50.66 ยฑ0.46 / 51.15 ms โ”‚ 50.15 / 51.34 ยฑ0.68 / 52.08 ms โ”‚ no change โ”‚
   โ”‚ QQuery 10 โ”‚ 42.66 / 43.36 ยฑ1.13 / 45.61 ms โ”‚ 42.36 / 43.23 ยฑ1.15 / 45.47 ms โ”‚ no change โ”‚
   โ”‚ QQuery 11 โ”‚ 13.46 / 13.71 ยฑ0.14 / 13.90 ms โ”‚ 13.75 / 13.87 ยฑ0.08 / 13.99 ms โ”‚ no change โ”‚
   โ”‚ QQuery 12 โ”‚ 23.82 / 24.19 ยฑ0.29 / 24.51 ms โ”‚ 24.31 / 24.58 ยฑ0.24 / 25.01 ms โ”‚ no change โ”‚
   โ”‚ QQuery 13 โ”‚ 32.00 / 32.81 ยฑ0.54 / 33.53 ms โ”‚ 32.63 / 33.13 ยฑ0.81 / 34.75 ms โ”‚ no change โ”‚
   โ”‚ QQuery 14 โ”‚ 23.35 / 23.79 ยฑ0.22 / 23.95 ms โ”‚ 23.82 / 24.02 ยฑ0.14 / 24.26 ms โ”‚ no change โ”‚
   โ”‚ QQuery 15 โ”‚ 31.28 / 31.55 ยฑ0.30 / 32.12 ms โ”‚ 31.49 / 32.08 ยฑ0.61 / 33.08 ms โ”‚ no change โ”‚
   โ”‚ QQuery 16 โ”‚ 14.21 / 14.41 ยฑ0.13 / 14.56 ms โ”‚ 14.18 / 14.34 ยฑ0.11 / 14.47 ms โ”‚ no change โ”‚
   โ”‚ QQuery 17 โ”‚ 72.09 / 73.38 ยฑ1.47 / 76.11 ms โ”‚ 71.70 / 73.01 ยฑ1.41 / 75.68 ms โ”‚ no change โ”‚
   โ”‚ QQuery 18 โ”‚ 59.61 / 60.56 ยฑ1.01 / 62.43 ms โ”‚ 60.13 / 60.85 ยฑ0.86 / 62.51 ms โ”‚ no change โ”‚
   โ”‚ QQuery 19 โ”‚ 32.90 / 33.78 ยฑ0.94 / 35.60 ms โ”‚ 33.43 / 33.75 ยฑ0.31 / 34.31 ms โ”‚ no change โ”‚
   โ”‚ QQuery 20 โ”‚ 32.16 / 32.37 ยฑ0.11 / 32.46 ms โ”‚ 32.07 / 32.33 ยฑ0.26 / 32.81 ms โ”‚ no change โ”‚
   โ”‚ QQuery 21 โ”‚ 56.20 / 57.37 ยฑ1.28 / 58.97 ms โ”‚ 55.74 / 57.73 ยฑ1.56 / 59.32 ms โ”‚ no change โ”‚
   โ”‚ QQuery 22 โ”‚ 14.33 / 14.43 ยฑ0.07 / 14.54 ms โ”‚ 14.00 / 14.19 ยฑ0.16 / 14.40 ms โ”‚ no change โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
   โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
   โ”ƒ Benchmark Summary                             โ”ƒ          โ”ƒ
   โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
   โ”‚ Total Time (HEAD)                             โ”‚ 765.12ms โ”‚
   โ”‚ Total Time (adamg_fix-avg-decimal-overflow)   โ”‚ 767.13ms โ”‚
   โ”‚ Average Time (HEAD)                           โ”‚  34.78ms โ”‚
   โ”‚ Average Time (adamg_fix-avg-decimal-overflow) โ”‚  34.87ms โ”‚
   โ”‚ Queries Faster                                โ”‚        0 โ”‚
   โ”‚ Queries Slower                                โ”‚        0 โ”‚
   โ”‚ Queries with No Change                        โ”‚       22 โ”‚
   โ”‚ Queries with Failure                          โ”‚        0 โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
   ```
   
   </p>
   </details>
   
   <details><summary>Resource Usage</summary>
   
   **tpch โ€” base (merge-base)**
   | Metric | Value |
   |--------|-------|
   | Wall time | 5.0s |
   | Peak memory | 1.1 GiB |
   | Avg memory | 502.7 MiB |
   | CPU user | 22.1s |
   | CPU sys | 1.7s |
   | Peak spill | 0 B |
   
   **tpch โ€” branch**
   | Metric | Value |
   |--------|-------|
   | Wall time | 5.0s |
   | Peak memory | 1.0 GiB |
   | Avg memory | 482.3 MiB |
   | CPU user | 22.1s |
   | CPU sys | 1.8s |
   | Peak spill | 0 B |
   
   </details>
   
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4982180177

   ๐Ÿš€ 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981187015

   (BTW thank you @kosiew  for your never ending reviews -- it is very much appreciated)


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "kosiew (via GitHub)" <gi...@apache.org>.
kosiew commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3571296065


##########
datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs:
##########
@@ -271,6 +271,8 @@ pub fn convert_schema_to_types(columns: &Fields) -> Vec<DFColumnType> {
             DataType::Float16
             | DataType::Float32
             | DataType::Float64
+            | DataType::Decimal32(_, _)

Review Comment:
   
   ```
   # example of passing test (DFColumnType::Float makes SLT comparisons approximate for these decimal types) which should fail 
   +query R
   +select arrow_cast('1.2300', 'Decimal32(9, 4)');
   +----
   +1.23
   ```



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "AdamGS (via GitHub)" <gi...@apache.org>.
AdamGS commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3560629731


##########
datafusion/functions-aggregate/src/average.rs:
##########
@@ -125,6 +128,85 @@ impl Default for Avg {
     }
 }
 
+/// Digits reserved above the input precision for `avg`'s intermediate sum: 4 for
+/// the scale-up [`DecimalAverager`] applies before dividing (`Avg::return_type`
+/// adds 4 to the scale), 9 for the row count.
+///
+/// The 9 is a row budget. A sum of `n` rows of `Decimal(p, _)` is bounded by
+/// `n * 10^p`, so a sum type with `p + 4 + 9` digits holds `10^9` rows. The sum
+/// wraps on overflow, like the `sum` aggregate; the budget is what puts that out
+/// of reach. `Decimal256` input near max precision is the exception: no wider
+/// type exists, so its sum keeps only whatever headroom `Decimal256(76, _)` has
+/// left, as before this budget was introduced.
+const AVG_SUM_HEADROOM_DIGITS: u8 = 4 + 9;

Review Comment:
   This seems like a reasonable heuristic to me, while keeping reasonable performance in most cases. The alternative here would be to always use i256 for the intermediate sum which is much slower.



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981175249

   run benchmarks


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981370276

   ๐Ÿค– Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/22714#issuecomment-4981175249)
   
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
   
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   Architecture:                            aarch64
   CPU op-mode(s):                          64-bit
   Byte Order:                              Little Endian
   CPU(s):                                  16
   On-line CPU(s) list:                     0-15
   Vendor ID:                               ARM
   Model name:                              Neoverse-V2
   Model:                                   1
   Thread(s) per core:                      1
   Core(s) per cluster:                     16
   Socket(s):                               -
   Cluster(s):                              1
   Stepping:                                r0p1
   BogoMIPS:                                2000.00
   Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
   L1d cache:                               1 MiB (16 instances)
   L1i cache:                               1 MiB (16 instances)
   L2 cache:                                32 MiB (16 instances)
   L3 cache:                                80 MiB (1 instance)
   NUMA node(s):                            1
   NUMA node0 CPU(s):                       0-15
   Vulnerability Gather data sampling:      Not affected
   Vulnerability Indirect target selection: Not affected
   Vulnerability Itlb multihit:             Not affected
   Vulnerability L1tf:                      Not affected
   Vulnerability Mds:                       Not affected
   Vulnerability Meltdown:                  Not affected
   Vulnerability Mmio stale data:           Not affected
   Vulnerability Reg file data sampling:    Not affected
   Vulnerability Retbleed:                  Not affected
   Vulnerability Spec rstack overflow:      Not affected
   Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
   Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
   Vulnerability Spectre v2:                Mitigation; CSV2, BHB
   Vulnerability Srbds:                     Not affected
   Vulnerability Tsa:                       Not affected
   Vulnerability Tsx async abort:           Not affected
   Vulnerability Vmscape:                   Not affected
   ```
   
   </details>
   
   <details><summary>Details</summary>
   <p>
   
   ```
   Comparing HEAD and adamg_fix-avg-decimal-overflow
   --------------------
   Benchmark tpcds_sf1.json
   --------------------
   โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
   โ”ƒ Query     โ”ƒ                                  HEAD โ”ƒ        adamg_fix-avg-decimal-overflow โ”ƒ        Change โ”ƒ
   โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
   โ”‚ QQuery 1  โ”‚           5.35 / 5.94 ยฑ0.88 / 7.67 ms โ”‚           5.34 / 5.91 ยฑ0.95 / 7.80 ms โ”‚     no change โ”‚
   โ”‚ QQuery 2  โ”‚        79.76 / 80.26 ยฑ0.38 / 80.80 ms โ”‚        80.86 / 81.16 ยฑ0.20 / 81.43 ms โ”‚     no change โ”‚
   โ”‚ QQuery 3  โ”‚        29.72 / 29.88 ยฑ0.24 / 30.35 ms โ”‚        29.58 / 29.83 ยฑ0.22 / 30.13 ms โ”‚     no change โ”‚
   โ”‚ QQuery 4  โ”‚     491.76 / 494.14 ยฑ3.45 / 500.93 ms โ”‚     488.23 / 491.37 ยฑ1.98 / 494.45 ms โ”‚     no change โ”‚
   โ”‚ QQuery 5  โ”‚        51.94 / 52.52 ยฑ0.60 / 53.64 ms โ”‚        51.60 / 52.29 ยฑ0.45 / 52.77 ms โ”‚     no change โ”‚
   โ”‚ QQuery 6  โ”‚        36.59 / 37.32 ยฑ0.45 / 37.97 ms โ”‚        36.73 / 37.02 ยฑ0.27 / 37.42 ms โ”‚     no change โ”‚
   โ”‚ QQuery 7  โ”‚        94.61 / 95.94 ยฑ0.92 / 97.49 ms โ”‚        94.45 / 94.93 ยฑ0.38 / 95.58 ms โ”‚     no change โ”‚
   โ”‚ QQuery 8  โ”‚        36.96 / 38.59 ยฑ2.01 / 42.48 ms โ”‚        36.95 / 37.76 ยฑ1.17 / 40.09 ms โ”‚     no change โ”‚
   โ”‚ QQuery 9  โ”‚        52.20 / 54.67 ยฑ1.61 / 57.16 ms โ”‚        52.90 / 53.80 ยฑ0.89 / 55.34 ms โ”‚     no change โ”‚
   โ”‚ QQuery 10 โ”‚        63.68 / 64.23 ยฑ0.50 / 65.16 ms โ”‚        63.45 / 63.80 ยฑ0.36 / 64.29 ms โ”‚     no change โ”‚
   โ”‚ QQuery 11 โ”‚     310.17 / 316.91 ยฑ4.05 / 321.51 ms โ”‚     298.75 / 309.07 ยฑ6.57 / 317.70 ms โ”‚     no change โ”‚
   โ”‚ QQuery 12 โ”‚        28.87 / 29.34 ยฑ0.37 / 29.91 ms โ”‚        28.52 / 28.92 ยฑ0.30 / 29.33 ms โ”‚     no change โ”‚
   โ”‚ QQuery 13 โ”‚     119.25 / 120.39 ยฑ1.64 / 123.64 ms โ”‚     118.73 / 120.01 ยฑ1.80 / 123.53 ms โ”‚     no change โ”‚
   โ”‚ QQuery 14 โ”‚     415.91 / 418.31 ยฑ1.74 / 421.19 ms โ”‚     413.00 / 415.63 ยฑ1.73 / 418.24 ms โ”‚     no change โ”‚
   โ”‚ QQuery 15 โ”‚        58.37 / 58.94 ยฑ0.49 / 59.80 ms โ”‚        57.20 / 58.21 ยฑ0.78 / 59.59 ms โ”‚     no change โ”‚
   โ”‚ QQuery 16 โ”‚           6.62 / 6.79 ยฑ0.25 / 7.28 ms โ”‚           6.44 / 6.60 ยฑ0.18 / 6.93 ms โ”‚     no change โ”‚
   โ”‚ QQuery 17 โ”‚        81.42 / 82.25 ยฑ0.86 / 83.90 ms โ”‚        79.88 / 80.92 ยฑ1.43 / 83.71 ms โ”‚     no change โ”‚
   โ”‚ QQuery 18 โ”‚     125.12 / 126.44 ยฑ1.16 / 127.78 ms โ”‚     123.54 / 124.55 ยฑ0.82 / 125.61 ms โ”‚     no change โ”‚
   โ”‚ QQuery 19 โ”‚        42.29 / 42.52 ยฑ0.27 / 43.02 ms โ”‚        42.21 / 42.49 ยฑ0.16 / 42.63 ms โ”‚     no change โ”‚
   โ”‚ QQuery 20 โ”‚        35.64 / 36.22 ยฑ0.33 / 36.61 ms โ”‚        36.12 / 37.23 ยฑ1.01 / 38.97 ms โ”‚     no change โ”‚
   โ”‚ QQuery 21 โ”‚        17.49 / 17.99 ยฑ0.28 / 18.28 ms โ”‚        17.61 / 17.83 ยฑ0.21 / 18.20 ms โ”‚     no change โ”‚
   โ”‚ QQuery 22 โ”‚        63.45 / 63.90 ยฑ0.38 / 64.60 ms โ”‚        63.72 / 65.74 ยฑ1.88 / 68.60 ms โ”‚     no change โ”‚
   โ”‚ QQuery 23 โ”‚    348.71 / 360.77 ยฑ13.13 / 385.51 ms โ”‚     348.28 / 353.19 ยฑ3.19 / 357.87 ms โ”‚     no change โ”‚
   โ”‚ QQuery 24 โ”‚     227.16 / 228.80 ยฑ1.77 / 231.97 ms โ”‚     226.44 / 228.74 ยฑ2.80 / 233.89 ms โ”‚     no change โ”‚
   โ”‚ QQuery 25 โ”‚     110.38 / 112.18 ยฑ1.56 / 114.85 ms โ”‚     110.50 / 111.41 ยฑ1.28 / 113.84 ms โ”‚     no change โ”‚
   โ”‚ QQuery 26 โ”‚        57.50 / 59.64 ยฑ1.99 / 62.89 ms โ”‚        57.85 / 59.86 ยฑ1.85 / 63.10 ms โ”‚     no change โ”‚
   โ”‚ QQuery 27 โ”‚           6.08 / 6.22 ยฑ0.20 / 6.62 ms โ”‚           6.30 / 6.44 ยฑ0.14 / 6.70 ms โ”‚     no change โ”‚
   โ”‚ QQuery 28 โ”‚        56.88 / 59.91 ยฑ2.26 / 62.55 ms โ”‚        61.37 / 62.08 ยฑ0.74 / 63.14 ms โ”‚     no change โ”‚
   โ”‚ QQuery 29 โ”‚      98.88 / 100.06 ยฑ1.28 / 102.47 ms โ”‚      97.42 / 100.13 ยฑ4.17 / 108.39 ms โ”‚     no change โ”‚
   โ”‚ QQuery 30 โ”‚        32.77 / 34.58 ยฑ1.63 / 37.65 ms โ”‚        32.57 / 33.12 ยฑ0.37 / 33.72 ms โ”‚     no change โ”‚
   โ”‚ QQuery 31 โ”‚     112.41 / 113.61 ยฑ0.91 / 114.88 ms โ”‚     112.59 / 112.91 ยฑ0.17 / 113.10 ms โ”‚     no change โ”‚
   โ”‚ QQuery 32 โ”‚        20.59 / 20.99 ยฑ0.24 / 21.31 ms โ”‚        20.68 / 20.80 ยฑ0.14 / 21.05 ms โ”‚     no change โ”‚
   โ”‚ QQuery 33 โ”‚        38.48 / 39.99 ยฑ1.43 / 41.93 ms โ”‚        38.36 / 38.74 ยฑ0.41 / 39.38 ms โ”‚     no change โ”‚
   โ”‚ QQuery 34 โ”‚         9.88 / 10.28 ยฑ0.46 / 11.17 ms โ”‚        10.18 / 10.41 ยฑ0.18 / 10.65 ms โ”‚     no change โ”‚
   โ”‚ QQuery 35 โ”‚        74.17 / 74.80 ยฑ0.55 / 75.62 ms โ”‚        73.75 / 74.81 ยฑ0.88 / 75.86 ms โ”‚     no change โ”‚
   โ”‚ QQuery 36 โ”‚           5.54 / 5.75 ยฑ0.19 / 6.08 ms โ”‚           5.63 / 5.76 ยฑ0.19 / 6.13 ms โ”‚     no change โ”‚
   โ”‚ QQuery 37 โ”‚           6.84 / 6.90 ยฑ0.05 / 7.00 ms โ”‚           6.78 / 6.83 ยฑ0.07 / 6.96 ms โ”‚     no change โ”‚
   โ”‚ QQuery 38 โ”‚        63.05 / 63.41 ยฑ0.24 / 63.79 ms โ”‚        62.56 / 62.88 ยฑ0.26 / 63.29 ms โ”‚     no change โ”‚
   โ”‚ QQuery 39 โ”‚        90.86 / 93.67 ยฑ2.94 / 97.28 ms โ”‚        90.34 / 92.48 ยฑ3.06 / 98.56 ms โ”‚     no change โ”‚
   โ”‚ QQuery 40 โ”‚        23.92 / 24.22 ยฑ0.20 / 24.44 ms โ”‚        23.70 / 24.02 ยฑ0.31 / 24.57 ms โ”‚     no change โ”‚
   โ”‚ QQuery 41 โ”‚        11.66 / 11.84 ยฑ0.21 / 12.23 ms โ”‚        11.78 / 12.01 ยฑ0.21 / 12.31 ms โ”‚     no change โ”‚
   โ”‚ QQuery 42 โ”‚        24.20 / 24.58 ยฑ0.34 / 25.06 ms โ”‚        24.05 / 24.59 ยฑ0.52 / 25.55 ms โ”‚     no change โ”‚
   โ”‚ QQuery 43 โ”‚           4.88 / 4.98 ยฑ0.14 / 5.26 ms โ”‚           5.01 / 5.11 ยฑ0.13 / 5.37 ms โ”‚     no change โ”‚
   โ”‚ QQuery 44 โ”‚           9.01 / 9.23 ยฑ0.12 / 9.37 ms โ”‚           9.38 / 9.53 ยฑ0.15 / 9.80 ms โ”‚     no change โ”‚
   โ”‚ QQuery 45 โ”‚        38.37 / 39.16 ยฑ0.64 / 39.95 ms โ”‚        38.44 / 38.74 ยฑ0.22 / 39.04 ms โ”‚     no change โ”‚
   โ”‚ QQuery 46 โ”‚        11.77 / 12.00 ยฑ0.14 / 12.15 ms โ”‚        11.88 / 12.10 ยฑ0.23 / 12.40 ms โ”‚     no change โ”‚
   โ”‚ QQuery 47 โ”‚     229.13 / 233.50 ยฑ3.37 / 237.86 ms โ”‚     232.58 / 237.56 ยฑ4.92 / 246.12 ms โ”‚     no change โ”‚
   โ”‚ QQuery 48 โ”‚        96.21 / 97.50 ยฑ0.79 / 98.59 ms โ”‚        96.81 / 97.95 ยฑ1.10 / 99.82 ms โ”‚     no change โ”‚
   โ”‚ QQuery 49 โ”‚        76.80 / 78.99 ยฑ2.36 / 83.22 ms โ”‚        77.03 / 78.48 ยฑ2.28 / 83.03 ms โ”‚     no change โ”‚
   โ”‚ QQuery 50 โ”‚        59.70 / 60.44 ยฑ0.42 / 60.94 ms โ”‚        59.62 / 60.71 ยฑ0.77 / 61.78 ms โ”‚     no change โ”‚
   โ”‚ QQuery 51 โ”‚        92.81 / 94.07 ยฑ0.94 / 95.64 ms โ”‚        91.38 / 93.02 ยฑ0.85 / 93.80 ms โ”‚     no change โ”‚
   โ”‚ QQuery 52 โ”‚        24.48 / 24.76 ยฑ0.21 / 25.06 ms โ”‚        24.63 / 24.80 ยฑ0.11 / 24.96 ms โ”‚     no change โ”‚
   โ”‚ QQuery 53 โ”‚        29.81 / 31.13 ยฑ1.95 / 34.99 ms โ”‚        30.15 / 32.37 ยฑ3.26 / 38.82 ms โ”‚     no change โ”‚
   โ”‚ QQuery 54 โ”‚        56.39 / 56.86 ยฑ0.61 / 58.06 ms โ”‚        56.29 / 57.34 ยฑ1.22 / 59.59 ms โ”‚     no change โ”‚
   โ”‚ QQuery 55 โ”‚        23.82 / 24.19 ยฑ0.32 / 24.74 ms โ”‚        23.95 / 24.44 ยฑ0.36 / 25.04 ms โ”‚     no change โ”‚
   โ”‚ QQuery 56 โ”‚        39.54 / 40.19 ยฑ0.49 / 40.73 ms โ”‚        39.03 / 39.56 ยฑ0.37 / 40.05 ms โ”‚     no change โ”‚
   โ”‚ QQuery 57 โ”‚     176.70 / 178.13 ยฑ1.12 / 179.57 ms โ”‚     178.52 / 179.70 ยฑ1.61 / 182.87 ms โ”‚     no change โ”‚
   โ”‚ QQuery 58 โ”‚     116.23 / 117.63 ยฑ1.31 / 119.97 ms โ”‚     115.48 / 117.44 ยฑ1.76 / 120.54 ms โ”‚     no change โ”‚
   โ”‚ QQuery 59 โ”‚     117.78 / 118.51 ยฑ0.50 / 119.14 ms โ”‚     119.32 / 119.69 ยฑ0.47 / 120.63 ms โ”‚     no change โ”‚
   โ”‚ QQuery 60 โ”‚        40.13 / 40.59 ยฑ0.30 / 40.86 ms โ”‚        39.87 / 40.60 ยฑ0.39 / 41.04 ms โ”‚     no change โ”‚
   โ”‚ QQuery 61 โ”‚        12.21 / 13.04 ยฑ1.16 / 15.32 ms โ”‚        12.03 / 13.16 ยฑ1.96 / 17.07 ms โ”‚     no change โ”‚
   โ”‚ QQuery 62 โ”‚        46.99 / 47.95 ยฑ1.15 / 50.20 ms โ”‚        46.62 / 47.18 ยฑ0.81 / 48.79 ms โ”‚     no change โ”‚
   โ”‚ QQuery 63 โ”‚        30.16 / 30.61 ยฑ0.33 / 31.05 ms โ”‚        30.28 / 30.72 ยฑ0.38 / 31.25 ms โ”‚     no change โ”‚
   โ”‚ QQuery 64 โ”‚     409.02 / 413.72 ยฑ2.76 / 416.77 ms โ”‚     411.46 / 413.29 ยฑ1.61 / 415.85 ms โ”‚     no change โ”‚
   โ”‚ QQuery 65 โ”‚     127.36 / 130.42 ยฑ2.22 / 133.79 ms โ”‚     131.13 / 133.15 ยฑ1.74 / 136.31 ms โ”‚     no change โ”‚
   โ”‚ QQuery 66 โ”‚        80.19 / 81.05 ยฑ0.52 / 81.72 ms โ”‚        80.26 / 80.80 ยฑ0.43 / 81.27 ms โ”‚     no change โ”‚
   โ”‚ QQuery 67 โ”‚     250.58 / 253.77 ยฑ1.98 / 256.10 ms โ”‚     250.06 / 251.66 ยฑ2.85 / 257.35 ms โ”‚     no change โ”‚
   โ”‚ QQuery 68 โ”‚        12.25 / 12.36 ยฑ0.14 / 12.63 ms โ”‚        11.85 / 12.02 ยฑ0.18 / 12.33 ms โ”‚     no change โ”‚
   โ”‚ QQuery 69 โ”‚        59.19 / 62.09 ยฑ3.48 / 68.54 ms โ”‚        57.86 / 60.00 ยฑ2.81 / 65.52 ms โ”‚     no change โ”‚
   โ”‚ QQuery 70 โ”‚     107.21 / 110.21 ยฑ3.76 / 117.54 ms โ”‚     106.19 / 108.95 ยฑ3.08 / 113.97 ms โ”‚     no change โ”‚
   โ”‚ QQuery 71 โ”‚        36.27 / 36.63 ยฑ0.20 / 36.89 ms โ”‚        35.30 / 36.46 ยฑ0.68 / 37.23 ms โ”‚     no change โ”‚
   โ”‚ QQuery 72 โ”‚ 2169.33 / 2241.45 ยฑ51.48 / 2313.24 ms โ”‚ 2171.01 / 2244.84 ยฑ80.58 / 2392.27 ms โ”‚     no change โ”‚
   โ”‚ QQuery 73 โ”‚          9.55 / 9.88 ยฑ0.34 / 10.35 ms โ”‚          9.64 / 9.82 ยฑ0.21 / 10.21 ms โ”‚     no change โ”‚
   โ”‚ QQuery 74 โ”‚     171.44 / 175.04 ยฑ4.94 / 184.47 ms โ”‚     174.71 / 179.29 ยฑ3.98 / 186.21 ms โ”‚     no change โ”‚
   โ”‚ QQuery 75 โ”‚     148.87 / 150.09 ยฑ1.20 / 152.36 ms โ”‚     150.18 / 152.32 ยฑ1.58 / 154.65 ms โ”‚     no change โ”‚
   โ”‚ QQuery 76 โ”‚        35.41 / 35.86 ยฑ0.32 / 36.23 ms โ”‚        35.39 / 35.90 ยฑ0.37 / 36.54 ms โ”‚     no change โ”‚
   โ”‚ QQuery 77 โ”‚        61.68 / 64.27 ยฑ2.41 / 67.29 ms โ”‚        62.02 / 64.22 ยฑ2.31 / 68.71 ms โ”‚     no change โ”‚
   โ”‚ QQuery 78 โ”‚     196.92 / 199.82 ยฑ2.57 / 204.26 ms โ”‚     199.05 / 203.15 ยฑ3.12 / 208.58 ms โ”‚     no change โ”‚
   โ”‚ QQuery 79 โ”‚        67.87 / 68.25 ยฑ0.27 / 68.69 ms โ”‚        68.13 / 68.81 ยฑ0.45 / 69.39 ms โ”‚     no change โ”‚
   โ”‚ QQuery 80 โ”‚     100.55 / 103.76 ยฑ4.08 / 110.59 ms โ”‚      98.89 / 102.16 ยฑ2.48 / 106.35 ms โ”‚     no change โ”‚
   โ”‚ QQuery 81 โ”‚        25.98 / 26.55 ยฑ0.34 / 26.93 ms โ”‚        26.96 / 27.91 ยฑ1.69 / 31.29 ms โ”‚  1.05x slower โ”‚
   โ”‚ QQuery 82 โ”‚        16.29 / 16.64 ยฑ0.23 / 16.85 ms โ”‚        16.91 / 17.24 ยฑ0.29 / 17.78 ms โ”‚     no change โ”‚
   โ”‚ QQuery 83 โ”‚        40.01 / 40.32 ยฑ0.29 / 40.71 ms โ”‚        40.59 / 41.10 ยฑ0.75 / 42.59 ms โ”‚     no change โ”‚
   โ”‚ QQuery 84 โ”‚        30.17 / 30.53 ยฑ0.24 / 30.81 ms โ”‚        30.69 / 30.92 ยฑ0.29 / 31.49 ms โ”‚     no change โ”‚
   โ”‚ QQuery 85 โ”‚     107.60 / 111.06 ยฑ4.13 / 118.67 ms โ”‚     108.29 / 111.48 ยฑ3.42 / 117.51 ms โ”‚     no change โ”‚
   โ”‚ QQuery 86 โ”‚        25.21 / 25.52 ยฑ0.29 / 26.01 ms โ”‚        25.75 / 26.24 ยฑ0.35 / 26.66 ms โ”‚     no change โ”‚
   โ”‚ QQuery 87 โ”‚        62.88 / 64.05 ยฑ1.02 / 65.85 ms โ”‚        63.89 / 64.46 ยฑ0.49 / 65.05 ms โ”‚     no change โ”‚
   โ”‚ QQuery 88 โ”‚        63.43 / 63.93 ยฑ0.44 / 64.59 ms โ”‚        63.69 / 66.05 ยฑ3.81 / 73.65 ms โ”‚     no change โ”‚
   โ”‚ QQuery 89 โ”‚        36.39 / 39.83 ยฑ5.31 / 50.28 ms โ”‚        36.82 / 37.75 ยฑ1.14 / 39.91 ms โ”‚ +1.06x faster โ”‚
   โ”‚ QQuery 90 โ”‚        17.10 / 17.37 ยฑ0.21 / 17.65 ms โ”‚        17.56 / 17.66 ยฑ0.12 / 17.89 ms โ”‚     no change โ”‚
   โ”‚ QQuery 91 โ”‚        45.94 / 46.54 ยฑ0.46 / 47.09 ms โ”‚        46.22 / 47.06 ยฑ0.46 / 47.59 ms โ”‚     no change โ”‚
   โ”‚ QQuery 92 โ”‚        29.62 / 30.24 ยฑ0.42 / 30.82 ms โ”‚        30.03 / 31.10 ยฑ0.81 / 32.47 ms โ”‚     no change โ”‚
   โ”‚ QQuery 93 โ”‚        49.37 / 50.77 ยฑ0.84 / 51.78 ms โ”‚        51.50 / 52.13 ยฑ0.40 / 52.67 ms โ”‚     no change โ”‚
   โ”‚ QQuery 94 โ”‚        38.76 / 40.13 ยฑ1.49 / 42.54 ms โ”‚        39.07 / 40.88 ยฑ2.15 / 45.03 ms โ”‚     no change โ”‚
   โ”‚ QQuery 95 โ”‚        81.15 / 82.63 ยฑ1.62 / 85.63 ms โ”‚        81.26 / 82.93 ยฑ1.44 / 85.15 ms โ”‚     no change โ”‚
   โ”‚ QQuery 96 โ”‚        24.37 / 24.56 ยฑ0.24 / 25.02 ms โ”‚        24.67 / 24.79 ยฑ0.12 / 24.95 ms โ”‚     no change โ”‚
   โ”‚ QQuery 97 โ”‚        47.48 / 47.61 ยฑ0.13 / 47.82 ms โ”‚        47.05 / 47.45 ยฑ0.26 / 47.75 ms โ”‚     no change โ”‚
   โ”‚ QQuery 98 โ”‚        43.54 / 45.44 ยฑ2.13 / 49.34 ms โ”‚        43.65 / 44.38 ยฑ0.63 / 45.55 ms โ”‚     no change โ”‚
   โ”‚ QQuery 99 โ”‚        70.41 / 70.85 ยฑ0.27 / 71.22 ms โ”‚        70.46 / 71.44 ยฑ0.90 / 72.83 ms โ”‚     no change โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
   โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
   โ”ƒ Benchmark Summary                             โ”ƒ            โ”ƒ
   โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
   โ”‚ Total Time (HEAD)                             โ”‚ 10102.39ms โ”‚
   โ”‚ Total Time (adamg_fix-avg-decimal-overflow)   โ”‚ 10096.27ms โ”‚
   โ”‚ Average Time (HEAD)                           โ”‚   102.04ms โ”‚
   โ”‚ Average Time (adamg_fix-avg-decimal-overflow) โ”‚   101.98ms โ”‚
   โ”‚ Queries Faster                                โ”‚          1 โ”‚
   โ”‚ Queries Slower                                โ”‚          1 โ”‚
   โ”‚ Queries with No Change                        โ”‚         97 โ”‚
   โ”‚ Queries with Failure                          โ”‚          0 โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
   ```
   
   </p>
   </details>
   
   <details><summary>Resource Usage</summary>
   
   **tpcds โ€” base (merge-base)**
   | Metric | Value |
   |--------|-------|
   | Wall time | 55.0s |
   | Peak memory | 2.0 GiB |
   | Avg memory | 1.3 GiB |
   | CPU user | 231.6s |
   | CPU sys | 6.0s |
   | Peak spill | 0 B |
   
   **tpcds โ€” branch**
   | Metric | Value |
   |--------|-------|
   | Wall time | 55.0s |
   | Peak memory | 2.1 GiB |
   | Avg memory | 1.4 GiB |
   | CPU user | 229.6s |
   | CPU sys | 5.9s |
   | Peak spill | 0 B |
   
   </details>
   
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb merged PR #22714:
URL: https://github.com/apache/datafusion/pull/22714


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981404723

   ๐Ÿค– Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/22714#issuecomment-4981175249)
   
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
   
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   Architecture:                            aarch64
   CPU op-mode(s):                          64-bit
   Byte Order:                              Little Endian
   CPU(s):                                  16
   On-line CPU(s) list:                     0-15
   Vendor ID:                               ARM
   Model name:                              Neoverse-V2
   Model:                                   1
   Thread(s) per core:                      1
   Core(s) per cluster:                     16
   Socket(s):                               -
   Cluster(s):                              1
   Stepping:                                r0p1
   BogoMIPS:                                2000.00
   Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
   L1d cache:                               1 MiB (16 instances)
   L1i cache:                               1 MiB (16 instances)
   L2 cache:                                32 MiB (16 instances)
   L3 cache:                                80 MiB (1 instance)
   NUMA node(s):                            1
   NUMA node0 CPU(s):                       0-15
   Vulnerability Gather data sampling:      Not affected
   Vulnerability Indirect target selection: Not affected
   Vulnerability Itlb multihit:             Not affected
   Vulnerability L1tf:                      Not affected
   Vulnerability Mds:                       Not affected
   Vulnerability Meltdown:                  Not affected
   Vulnerability Mmio stale data:           Not affected
   Vulnerability Reg file data sampling:    Not affected
   Vulnerability Retbleed:                  Not affected
   Vulnerability Spec rstack overflow:      Not affected
   Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
   Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
   Vulnerability Spectre v2:                Mitigation; CSV2, BHB
   Vulnerability Srbds:                     Not affected
   Vulnerability Tsa:                       Not affected
   Vulnerability Tsx async abort:           Not affected
   Vulnerability Vmscape:                   Not affected
   ```
   
   </details>
   
   <details><summary>Details</summary>
   <p>
   
   ```
   Comparing HEAD and adamg_fix-avg-decimal-overflow
   --------------------
   Benchmark clickbench_partitioned.json
   --------------------
   โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
   โ”ƒ Query     โ”ƒ                                  HEAD โ”ƒ        adamg_fix-avg-decimal-overflow โ”ƒ        Change โ”ƒ
   โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
   โ”‚ QQuery 0  โ”‚          1.24 / 3.95 ยฑ5.33 / 14.61 ms โ”‚          1.23 / 3.91 ยฑ5.27 / 14.44 ms โ”‚     no change โ”‚
   โ”‚ QQuery 1  โ”‚        13.20 / 13.46 ยฑ0.16 / 13.68 ms โ”‚        12.72 / 13.01 ยฑ0.17 / 13.18 ms โ”‚     no change โ”‚
   โ”‚ QQuery 2  โ”‚        37.07 / 37.37 ยฑ0.30 / 37.73 ms โ”‚        35.80 / 36.35 ยฑ0.43 / 37.09 ms โ”‚     no change โ”‚
   โ”‚ QQuery 3  โ”‚        30.78 / 31.53 ยฑ0.81 / 33.03 ms โ”‚        30.55 / 30.81 ยฑ0.31 / 31.39 ms โ”‚     no change โ”‚
   โ”‚ QQuery 4  โ”‚     222.02 / 226.07 ยฑ3.61 / 231.83 ms โ”‚     222.82 / 225.00 ยฑ2.28 / 229.27 ms โ”‚     no change โ”‚
   โ”‚ QQuery 5  โ”‚     268.84 / 271.37 ยฑ2.06 / 273.99 ms โ”‚     270.72 / 273.46 ยฑ1.63 / 275.12 ms โ”‚     no change โ”‚
   โ”‚ QQuery 6  โ”‚           1.28 / 1.44 ยฑ0.24 / 1.91 ms โ”‚           1.28 / 1.43 ยฑ0.23 / 1.89 ms โ”‚     no change โ”‚
   โ”‚ QQuery 7  โ”‚        14.03 / 14.43 ยฑ0.27 / 14.88 ms โ”‚        13.85 / 13.97 ยฑ0.09 / 14.09 ms โ”‚     no change โ”‚
   โ”‚ QQuery 8  โ”‚    323.74 / 336.57 ยฑ21.22 / 378.87 ms โ”‚     325.80 / 331.36 ยฑ3.92 / 336.20 ms โ”‚     no change โ”‚
   โ”‚ QQuery 9  โ”‚     445.71 / 457.70 ยฑ7.28 / 467.35 ms โ”‚    456.32 / 468.59 ยฑ10.77 / 483.63 ms โ”‚     no change โ”‚
   โ”‚ QQuery 10 โ”‚        69.05 / 71.92 ยฑ4.57 / 81.02 ms โ”‚        68.48 / 70.60 ยฑ1.49 / 72.53 ms โ”‚     no change โ”‚
   โ”‚ QQuery 11 โ”‚        80.80 / 81.82 ยฑ1.14 / 83.46 ms โ”‚       80.47 / 85.75 ยฑ7.56 / 100.77 ms โ”‚     no change โ”‚
   โ”‚ QQuery 12 โ”‚     264.67 / 268.47 ยฑ3.85 / 275.84 ms โ”‚     268.13 / 273.01 ยฑ3.05 / 277.48 ms โ”‚     no change โ”‚
   โ”‚ QQuery 13 โ”‚    364.84 / 376.93 ยฑ11.19 / 397.49 ms โ”‚     367.82 / 375.20 ยฑ8.78 / 392.46 ms โ”‚     no change โ”‚
   โ”‚ QQuery 14 โ”‚     281.40 / 285.15 ยฑ2.58 / 289.29 ms โ”‚     282.36 / 288.40 ยฑ5.19 / 296.71 ms โ”‚     no change โ”‚
   โ”‚ QQuery 15 โ”‚     271.54 / 278.85 ยฑ7.36 / 288.20 ms โ”‚     270.89 / 278.88 ยฑ5.60 / 287.18 ms โ”‚     no change โ”‚
   โ”‚ QQuery 16 โ”‚     610.00 / 618.21 ยฑ6.10 / 625.35 ms โ”‚     615.11 / 625.75 ยฑ8.25 / 637.40 ms โ”‚     no change โ”‚
   โ”‚ QQuery 17 โ”‚     627.66 / 637.83 ยฑ8.12 / 644.73 ms โ”‚     625.31 / 635.29 ยฑ9.89 / 654.17 ms โ”‚     no change โ”‚
   โ”‚ QQuery 18 โ”‚ 1265.47 / 1297.18 ยฑ23.82 / 1332.68 ms โ”‚ 1272.64 / 1292.87 ยฑ21.65 / 1330.16 ms โ”‚     no change โ”‚
   โ”‚ QQuery 19 โ”‚        28.04 / 28.38 ยฑ0.42 / 29.19 ms โ”‚       28.08 / 35.37 ยฑ11.81 / 58.63 ms โ”‚  1.25x slower โ”‚
   โ”‚ QQuery 20 โ”‚    513.37 / 526.18 ยฑ14.42 / 548.95 ms โ”‚     511.98 / 518.51 ยฑ8.73 / 535.47 ms โ”‚     no change โ”‚
   โ”‚ QQuery 21 โ”‚     513.08 / 518.88 ยฑ5.68 / 529.33 ms โ”‚     512.46 / 515.26 ยฑ3.10 / 521.06 ms โ”‚     no change โ”‚
   โ”‚ QQuery 22 โ”‚    980.77 / 992.31 ยฑ9.15 / 1006.61 ms โ”‚    983.43 / 995.15 ยฑ8.20 / 1004.42 ms โ”‚     no change โ”‚
   โ”‚ QQuery 23 โ”‚ 3033.27 / 3069.82 ยฑ25.86 / 3109.39 ms โ”‚ 3010.87 / 3074.85 ยฑ47.08 / 3143.91 ms โ”‚     no change โ”‚
   โ”‚ QQuery 24 โ”‚        41.32 / 45.22 ยฑ3.15 / 50.31 ms โ”‚        41.33 / 43.00 ยฑ1.66 / 45.50 ms โ”‚     no change โ”‚
   โ”‚ QQuery 25 โ”‚     111.57 / 112.35 ยฑ0.95 / 114.22 ms โ”‚     110.57 / 111.25 ยฑ0.65 / 112.39 ms โ”‚     no change โ”‚
   โ”‚ QQuery 26 โ”‚        41.75 / 44.89 ยฑ4.82 / 54.32 ms โ”‚        41.75 / 42.64 ยฑ0.75 / 43.67 ms โ”‚ +1.05x faster โ”‚
   โ”‚ QQuery 27 โ”‚     670.67 / 675.94 ยฑ4.54 / 683.89 ms โ”‚     666.75 / 674.20 ยฑ5.85 / 684.64 ms โ”‚     no change โ”‚
   โ”‚ QQuery 28 โ”‚  3025.96 / 3029.63 ยฑ3.02 / 3034.94 ms โ”‚ 3001.78 / 3029.44 ยฑ17.08 / 3046.73 ms โ”‚     no change โ”‚
   โ”‚ QQuery 29 โ”‚        41.24 / 41.84 ยฑ0.61 / 43.00 ms โ”‚        41.13 / 44.85 ยฑ6.76 / 58.36 ms โ”‚  1.07x slower โ”‚
   โ”‚ QQuery 30 โ”‚     302.39 / 315.05 ยฑ9.73 / 327.69 ms โ”‚     305.75 / 310.60 ยฑ5.08 / 317.59 ms โ”‚     no change โ”‚
   โ”‚ QQuery 31 โ”‚    280.02 / 296.58 ยฑ18.54 / 330.36 ms โ”‚    281.87 / 292.07 ยฑ11.40 / 311.96 ms โ”‚     no change โ”‚
   โ”‚ QQuery 32 โ”‚    905.44 / 929.29 ยฑ15.89 / 951.34 ms โ”‚     920.83 / 932.40 ยฑ6.06 / 938.21 ms โ”‚     no change โ”‚
   โ”‚ QQuery 33 โ”‚ 1451.32 / 1468.75 ยฑ26.27 / 1520.11 ms โ”‚ 1445.40 / 1467.60 ยฑ17.90 / 1490.42 ms โ”‚     no change โ”‚
   โ”‚ QQuery 34 โ”‚ 1463.30 / 1509.43 ยฑ33.47 / 1560.65 ms โ”‚ 1458.60 / 1491.57 ยฑ22.26 / 1527.87 ms โ”‚     no change โ”‚
   โ”‚ QQuery 35 โ”‚     282.18 / 286.95 ยฑ3.35 / 291.16 ms โ”‚    279.71 / 306.56 ยฑ44.37 / 394.97 ms โ”‚  1.07x slower โ”‚
   โ”‚ QQuery 36 โ”‚        65.88 / 69.27 ยฑ3.12 / 73.44 ms โ”‚        68.01 / 74.56 ยฑ4.32 / 78.75 ms โ”‚  1.08x slower โ”‚
   โ”‚ QQuery 37 โ”‚        35.88 / 41.93 ยฑ5.25 / 50.17 ms โ”‚        35.57 / 40.82 ยฑ3.97 / 45.69 ms โ”‚     no change โ”‚
   โ”‚ QQuery 38 โ”‚        42.44 / 47.83 ยฑ5.83 / 58.18 ms โ”‚        41.56 / 43.85 ยฑ1.49 / 45.54 ms โ”‚ +1.09x faster โ”‚
   โ”‚ QQuery 39 โ”‚     147.90 / 155.80 ยฑ5.25 / 163.83 ms โ”‚     149.01 / 156.84 ยฑ7.21 / 166.34 ms โ”‚     no change โ”‚
   โ”‚ QQuery 40 โ”‚        14.85 / 21.01 ยฑ9.10 / 38.72 ms โ”‚        14.46 / 16.97 ยฑ3.24 / 23.26 ms โ”‚ +1.24x faster โ”‚
   โ”‚ QQuery 41 โ”‚        13.81 / 14.25 ยฑ0.38 / 14.85 ms โ”‚        13.73 / 16.06 ยฑ4.08 / 24.22 ms โ”‚  1.13x slower โ”‚
   โ”‚ QQuery 42 โ”‚        13.02 / 14.68 ยฑ2.80 / 20.26 ms โ”‚        13.15 / 13.48 ยฑ0.19 / 13.73 ms โ”‚ +1.09x faster โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
   โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
   โ”ƒ Benchmark Summary                             โ”ƒ            โ”ƒ
   โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
   โ”‚ Total Time (HEAD)                             โ”‚ 19566.50ms โ”‚
   โ”‚ Total Time (adamg_fix-avg-decimal-overflow)   โ”‚ 19571.55ms โ”‚
   โ”‚ Average Time (HEAD)                           โ”‚   455.03ms โ”‚
   โ”‚ Average Time (adamg_fix-avg-decimal-overflow) โ”‚   455.15ms โ”‚
   โ”‚ Queries Faster                                โ”‚          4 โ”‚
   โ”‚ Queries Slower                                โ”‚          5 โ”‚
   โ”‚ Queries with No Change                        โ”‚         34 โ”‚
   โ”‚ Queries with Failure                          โ”‚          0 โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
   ```
   
   </p>
   </details>
   
   <details><summary>Resource Usage</summary>
   
   **clickbench_partitioned โ€” base (merge-base)**
   | Metric | Value |
   |--------|-------|
   | Wall time | 100.0s |
   | Peak memory | 11.1 GiB |
   | Avg memory | 4.2 GiB |
   | CPU user | 1011.3s |
   | CPU sys | 66.4s |
   | Peak spill | 0 B |
   
   **clickbench_partitioned โ€” branch**
   | Metric | Value |
   |--------|-------|
   | Wall time | 100.0s |
   | Peak memory | 11.8 GiB |
   | Avg memory | 4.2 GiB |
   | CPU user | 1008.4s |
   | CPU sys | 68.3s |
   | Peak spill | 0 B |
   
   </details>
   
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "AdamGS (via GitHub)" <gi...@apache.org>.
AdamGS commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3637726508


##########
datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs:
##########
@@ -271,6 +271,8 @@ pub fn convert_schema_to_types(columns: &Fields) -> Vec<DFColumnType> {
             DataType::Float16
             | DataType::Float32
             | DataType::Float64
+            | DataType::Decimal32(_, _)

Review Comment:
   I opened the [issue](https://github.com/apache/datafusion/issues/23835).
   I've narrowed it down to `big_decimal_to_str`, where we always call `normalize`, which trims the trailing 0.



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981197303

   ๐Ÿค– Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/22714#issuecomment-4981175249)
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4981175249-1079-b7f8g 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux`
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   Architecture:                            aarch64
   CPU op-mode(s):                          64-bit
   Byte Order:                              Little Endian
   CPU(s):                                  16
   On-line CPU(s) list:                     0-15
   Vendor ID:                               ARM
   Model name:                              Neoverse-V2
   Model:                                   1
   Thread(s) per core:                      1
   Core(s) per cluster:                     16
   Socket(s):                               -
   Cluster(s):                              1
   Stepping:                                r0p1
   BogoMIPS:                                2000.00
   Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
   L1d cache:                               1 MiB (16 instances)
   L1i cache:                               1 MiB (16 instances)
   L2 cache:                                32 MiB (16 instances)
   L3 cache:                                80 MiB (1 instance)
   NUMA node(s):                            1
   NUMA node0 CPU(s):                       0-15
   Vulnerability Gather data sampling:      Not affected
   Vulnerability Indirect target selection: Not affected
   Vulnerability Itlb multihit:             Not affected
   Vulnerability L1tf:                      Not affected
   Vulnerability Mds:                       Not affected
   Vulnerability Meltdown:                  Not affected
   Vulnerability Mmio stale data:           Not affected
   Vulnerability Reg file data sampling:    Not affected
   Vulnerability Retbleed:                  Not affected
   Vulnerability Spec rstack overflow:      Not affected
   Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
   Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
   Vulnerability Spectre v2:                Mitigation; CSV2, BHB
   Vulnerability Srbds:                     Not affected
   Vulnerability Tsa:                       Not affected
   Vulnerability Tsx async abort:           Not affected
   Vulnerability Vmscape:                   Not affected
   ```
   
   </details>
   
   Comparing adamg/fix-avg-decimal-overflow (90dd6ff0d3b5833a9ee9b8c7a00eb2121b3504c4) to 754e113 (merge-base) [diff](https://github.com/apache/datafusion/compare/754e11335eda9a219a7578a8c2f3436299cf00e6..90dd6ff0d3b5833a9ee9b8c7a00eb2121b3504c4) using: tpch
   Results will be posted here when complete
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "AdamGS (via GitHub)" <gi...@apache.org>.
AdamGS commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3364195676


##########
datafusion/functions-aggregate/src/average.rs:
##########
@@ -223,50 +233,48 @@ impl AggregateUDFImpl for Avg {
             match (&data_type, acc_args.return_type()) {
                 (Float64, Float64) => Ok(Box::<AvgAccumulator>::default()),
                 (
-                    Decimal32(sum_precision, sum_scale),
+                    Decimal32(_sum_precision, sum_scale),
                     Decimal32(target_precision, target_scale),
-                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal32Type> {
-                    sum: None,
-                    count: 0,
-                    sum_scale: *sum_scale,
-                    sum_precision: *sum_precision,
-                    target_precision: *target_precision,
-                    target_scale: *target_scale,
-                })),
+                ) => Ok(Box::new(DecimalAvgAccumulator::<
+                    Decimal32Type,
+                    Decimal64Type,
+                >::new(
+                    *sum_scale,
+                    DECIMAL64_MAX_PRECISION,
+                    *target_precision,
+                    *target_scale,
+                ))),
                 (
-                    Decimal64(sum_precision, sum_scale),
+                    Decimal64(_sum_precision, sum_scale),
                     Decimal64(target_precision, target_scale),
-                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal64Type> {
-                    sum: None,
-                    count: 0,
-                    sum_scale: *sum_scale,
-                    sum_precision: *sum_precision,
-                    target_precision: *target_precision,
-                    target_scale: *target_scale,
-                })),
+                ) => Ok(Box::new(DecimalAvgAccumulator::<
+                    Decimal64Type,
+                    Decimal128Type,
+                >::new(
+                    *sum_scale,
+                    DECIMAL128_MAX_PRECISION,
+                    *target_precision,
+                    *target_scale,
+                ))),
                 (
                     Decimal128(sum_precision, sum_scale),
                     Decimal128(target_precision, target_scale),
-                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal128Type> {
-                    sum: None,
-                    count: 0,
-                    sum_scale: *sum_scale,
-                    sum_precision: *sum_precision,
-                    target_precision: *target_precision,
-                    target_scale: *target_scale,
-                })),
+                ) => Ok(Box::new(DecimalAvgAccumulator::<Decimal128Type>::new(

Review Comment:
   So it currently doesn't compile because the current code here assumes that the type we use for the sum can be `Into<I>`, but turns out that doesn't exist for `i256` and `i128`, I opened a [PR](https://github.com/apache/arrow-rs/issues/10080) to arrow, which might delay this part but I'll fix everything else.



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981176589

   I think the tpch tests uses decimal and avg 


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "AdamGS (via GitHub)" <gi...@apache.org>.
AdamGS commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3554553305


##########
datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs:
##########
@@ -271,6 +271,8 @@ pub fn convert_schema_to_types(columns: &Fields) -> Vec<DFColumnType> {
             DataType::Float16
             | DataType::Float32
             | DataType::Float64
+            | DataType::Decimal32(_, _)

Review Comment:
   I think display should be exact, I even made sure to extend it to decimal32/64 [here](https://github.com/apache/datafusion/pull/23161)



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "AdamGS (via GitHub)" <gi...@apache.org>.
AdamGS commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3364184715


##########
datafusion/functions-aggregate/src/average.rs:
##########


Review Comment:
   I'll take a look, I tried to keep this PR a bit smaller but I definitely suspect it has the same issue. 



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "AdamGS (via GitHub)" <gi...@apache.org>.
AdamGS commented on code in PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#discussion_r3571463696


##########
datafusion/sqllogictest/src/engines/datafusion_engine/normalize.rs:
##########
@@ -271,6 +271,8 @@ pub fn convert_schema_to_types(columns: &Fields) -> Vec<DFColumnType> {
             DataType::Float16
             | DataType::Float32
             | DataType::Float64
+            | DataType::Decimal32(_, _)

Review Comment:
   I think this should be a different issue, I'll open it later today as I did https://github.com/apache/datafusion/pull/23161 



-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981197036

   ๐Ÿค– Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/22714#issuecomment-4981175249)
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4981175249-1078-mpr7n 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux`
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   Architecture:                            aarch64
   CPU op-mode(s):                          64-bit
   Byte Order:                              Little Endian
   CPU(s):                                  16
   On-line CPU(s) list:                     0-15
   Vendor ID:                               ARM
   Model name:                              Neoverse-V2
   Model:                                   1
   Thread(s) per core:                      1
   Core(s) per cluster:                     16
   Socket(s):                               -
   Cluster(s):                              1
   Stepping:                                r0p1
   BogoMIPS:                                2000.00
   Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
   L1d cache:                               1 MiB (16 instances)
   L1i cache:                               1 MiB (16 instances)
   L2 cache:                                32 MiB (16 instances)
   L3 cache:                                80 MiB (1 instance)
   NUMA node(s):                            1
   NUMA node0 CPU(s):                       0-15
   Vulnerability Gather data sampling:      Not affected
   Vulnerability Indirect target selection: Not affected
   Vulnerability Itlb multihit:             Not affected
   Vulnerability L1tf:                      Not affected
   Vulnerability Mds:                       Not affected
   Vulnerability Meltdown:                  Not affected
   Vulnerability Mmio stale data:           Not affected
   Vulnerability Reg file data sampling:    Not affected
   Vulnerability Retbleed:                  Not affected
   Vulnerability Spec rstack overflow:      Not affected
   Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
   Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
   Vulnerability Spectre v2:                Mitigation; CSV2, BHB
   Vulnerability Srbds:                     Not affected
   Vulnerability Tsa:                       Not affected
   Vulnerability Tsx async abort:           Not affected
   Vulnerability Vmscape:                   Not affected
   ```
   
   </details>
   
   Comparing adamg/fix-avg-decimal-overflow (90dd6ff0d3b5833a9ee9b8c7a00eb2121b3504c4) to 754e113 (merge-base) [diff](https://github.com/apache/datafusion/compare/754e11335eda9a219a7578a8c2f3436299cf00e6..90dd6ff0d3b5833a9ee9b8c7a00eb2121b3504c4) using: tpcds
   Results will be posted here when complete
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [PR] fix: Handle potential overflow in internal state for `avg(decimal)` [datafusion]

Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #22714:
URL: https://github.com/apache/datafusion/pull/22714#issuecomment-4981203686

   ๐Ÿค– Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/22714#issuecomment-4981175249)
   **Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c4981175249-1077-6dtl4 6.12.85+ #1 SMP Mon May 11 08:17:35 UTC 2026 aarch64 GNU/Linux`
   <details><summary>CPU Details (lscpu)</summary>
   
   ```
   Architecture:                            aarch64
   CPU op-mode(s):                          64-bit
   Byte Order:                              Little Endian
   CPU(s):                                  16
   On-line CPU(s) list:                     0-15
   Vendor ID:                               ARM
   Model name:                              Neoverse-V2
   Model:                                   1
   Thread(s) per core:                      1
   Core(s) per cluster:                     16
   Socket(s):                               -
   Cluster(s):                              1
   Stepping:                                r0p1
   BogoMIPS:                                2000.00
   Flags:                                   fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm jscvt fcma lrcpc dcpop sha3 sm3 sm4 asimddp sha512 sve asimdfhm dit uscat ilrcpc flagm sb paca pacg dcpodp sve2 sveaes svepmull svebitperm svesha3 svesm4 flagm2 frint svei8mm svebf16 i8mm bf16 dgh rng bti
   L1d cache:                               1 MiB (16 instances)
   L1i cache:                               1 MiB (16 instances)
   L2 cache:                                32 MiB (16 instances)
   L3 cache:                                80 MiB (1 instance)
   NUMA node(s):                            1
   NUMA node0 CPU(s):                       0-15
   Vulnerability Gather data sampling:      Not affected
   Vulnerability Indirect target selection: Not affected
   Vulnerability Itlb multihit:             Not affected
   Vulnerability L1tf:                      Not affected
   Vulnerability Mds:                       Not affected
   Vulnerability Meltdown:                  Not affected
   Vulnerability Mmio stale data:           Not affected
   Vulnerability Reg file data sampling:    Not affected
   Vulnerability Retbleed:                  Not affected
   Vulnerability Spec rstack overflow:      Not affected
   Vulnerability Spec store bypass:         Mitigation; Speculative Store Bypass disabled via prctl
   Vulnerability Spectre v1:                Mitigation; __user pointer sanitization
   Vulnerability Spectre v2:                Mitigation; CSV2, BHB
   Vulnerability Srbds:                     Not affected
   Vulnerability Tsa:                       Not affected
   Vulnerability Tsx async abort:           Not affected
   Vulnerability Vmscape:                   Not affected
   ```
   
   </details>
   
   Comparing adamg/fix-avg-decimal-overflow (90dd6ff0d3b5833a9ee9b8c7a00eb2121b3504c4) to 754e113 (merge-base) [diff](https://github.com/apache/datafusion/compare/754e11335eda9a219a7578a8c2f3436299cf00e6..90dd6ff0d3b5833a9ee9b8c7a00eb2121b3504c4) using: clickbench_partitioned
   Results will be posted here when complete
   
   ---
   [File an issue](https://github.com/adriangb/datafusion-benchmarking/issues) against this benchmark runner


-- 
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: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org