You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "Dandandan (via GitHub)" <gi...@apache.org> on 2026/08/20 14:05:02 UTC
[PR] feat: derive a distinct count from primary key and unique constraints [datafusion]
Dandandan opened a new pull request, #24520:
URL: https://github.com/apache/datafusion/pull/24520
## Which issue does this PR close?
- Closes #.
## Rationale for this change
A join estimates how many rows it produces from the number of distinct values in
each side's key. No file format records a distinct count, so a scan reports it as
unknown and the estimate falls back to a guess β even when the table declares the
column unique.
TPC-H and TPC-DS both declare their primary keys (`benchmarks/src/tpch/mod.rs`,
`benchmarks/src/tpcds/run.rs`), and the constraints do reach the scan's
`EquivalenceProperties`, but nothing turns them into statistics. So today
`orders(o_orderkey)` is known to be unique and still reports no distinct count.
## What changes are included in this PR?
A single-column `PrimaryKey` or `Unique` constraint sets the column's distinct count
to the row count, less the nulls a unique column may repeat.
Left alone:
- composite keys, which say nothing about their columns on their own
- columns that already have a distinct count
The count is inexact: constraints are `new_unverified`, so the data may not honour
them.
## Are these changes tested?
Yes, a unit test covers a primary key, a unique column with nulls, a composite key,
and that the count survives the scan's projection.
## Are there any user-facing changes?
`EXPLAIN` with `datafusion.explain.show_statistics` reports a distinct count for key
columns, and plans that depend on cardinality estimates may change for tables that
declare constraints. No API change.
--
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357586905
π€ Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/24520#issuecomment-5357542286)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c5357542286-1806-pd4tl 6.12.85+ #1 SMP Sat Jun 27 09:31:30 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 feat/pk-cardinality-estimation (32d17cb5dab2fb0f8129e737e13f0b010d72c38e) to 858d3bf (merge-base) [diff](https://github.com/apache/datafusion/compare/858d3bf7f9d36b0668946db7fb9c006892a95309..32d17cb5dab2fb0f8129e737e13f0b010d72c38e)
<details><summary>Run configuration</summary>
```yaml
run benchmark clickbench_partitioned
```
</details>
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357844882
π€ Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/24520#issuecomment-5357542286)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
Comparing feat/pk-cardinality-estimation (32d17cb5dab2fb0f8129e737e13f0b010d72c38e) to 858d3bf (merge-base) [diff](https://github.com/apache/datafusion/compare/858d3bf7f9d36b0668946db7fb9c006892a95309..32d17cb5dab2fb0f8129e737e13f0b010d72c38e)
<details><summary>Run configuration</summary>
```yaml
run benchmark clickbench_partitioned
```
</details>
<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 feat_pk-cardinality-estimation
--------------------
Benchmark clickbench_partitioned.json
--------------------
βββββββββββββ³βββββββββββββ³βββββββββββββββββββββββββββββββββ³ββββββββββββββββ
β Query β HEAD β feat_pk-cardinality-estimation β Change β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β QQuery 0 β 1.25 ms β 1.26 ms β no change β
β QQuery 1 β 12.55 ms β 12.35 ms β no change β
β QQuery 2 β 36.29 ms β 36.08 ms β no change β
β QQuery 3 β 31.96 ms β 31.52 ms β no change β
β QQuery 4 β 236.20 ms β 233.72 ms β no change β
β QQuery 5 β 277.55 ms β 280.95 ms β no change β
β QQuery 6 β 1.27 ms β 1.28 ms β no change β
β QQuery 7 β 13.50 ms β 13.24 ms β no change β
β QQuery 8 β 335.23 ms β 328.93 ms β no change β
β QQuery 9 β 479.08 ms β 453.51 ms β +1.06x faster β
β QQuery 10 β 72.25 ms β 70.76 ms β no change β
β QQuery 11 β 82.32 ms β 81.58 ms β no change β
β QQuery 12 β 281.73 ms β 276.99 ms β no change β
β QQuery 13 β 372.19 ms β 398.31 ms β 1.07x slower β
β QQuery 14 β 284.65 ms β 296.60 ms β no change β
β QQuery 15 β 280.43 ms β 297.48 ms β 1.06x slower β
β QQuery 16 β 628.84 ms β 654.29 ms β no change β
β QQuery 17 β 639.30 ms β 683.25 ms β 1.07x slower β
β QQuery 18 β 1263.53 ms β 1388.15 ms β 1.10x slower β
β QQuery 19 β 28.35 ms β 29.35 ms β no change β
β QQuery 20 β 522.52 ms β 537.82 ms β no change β
β QQuery 21 β 519.20 ms β 540.89 ms β no change β
β QQuery 22 β 992.37 ms β 1040.70 ms β no change β
β QQuery 23 β 3108.38 ms β 3185.17 ms β no change β
β QQuery 24 β 41.93 ms β 43.32 ms β no change β
β QQuery 25 β 110.73 ms β 114.86 ms β no change β
β QQuery 26 β 41.89 ms β 43.97 ms β no change β
β QQuery 27 β 515.24 ms β 533.46 ms β no change β
β QQuery 28 β 2917.70 ms β 3033.30 ms β no change β
β QQuery 29 β 41.26 ms β 41.96 ms β no change β
β QQuery 30 β 308.06 ms β 326.79 ms β 1.06x slower β
β QQuery 31 β 286.17 ms β 299.26 ms β no change β
β QQuery 32 β 945.02 ms β 1021.14 ms β 1.08x slower β
β QQuery 33 β 1485.45 ms β 1622.91 ms β 1.09x slower β
β QQuery 34 β 1511.38 ms β 1647.61 ms β 1.09x slower β
β QQuery 35 β 287.76 ms β 333.42 ms β 1.16x slower β
β QQuery 36 β 68.09 ms β 69.69 ms β no change β
β QQuery 37 β 36.44 ms β 37.77 ms β no change β
β QQuery 38 β 43.53 ms β 44.73 ms β no change β
β QQuery 39 β 151.31 ms β 160.27 ms β 1.06x slower β
β QQuery 40 β 14.80 ms β 15.43 ms β no change β
β QQuery 41 β 14.25 ms β 14.86 ms β no change β
β QQuery 42 β 13.76 ms β 14.48 ms β 1.05x slower β
βββββββββββββ΄βββββββββββββ΄βββββββββββββββββββββββββββββββββ΄ββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββ³βββββββββββββ
β Benchmark Summary β β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Total Time (HEAD) β 19335.72ms β
β Total Time (feat_pk-cardinality-estimation) β 20293.42ms β
β Average Time (HEAD) β 449.67ms β
β Average Time (feat_pk-cardinality-estimation) β 471.94ms β
β Queries Faster β 1 β
β Queries Slower β 11 β
β Queries with No Change β 31 β
β Queries with Failure β 0 β
βββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββ
Distribution per query (min / mean Β±stddev / max):
Comparing HEAD and feat_pk-cardinality-estimation
--------------------
Benchmark clickbench_partitioned.json
--------------------
βββββββββββββ³ββββββββββββββββββββββββββββββββββββββββ³ββββββββββββββββββββββββββββββββββββββββ³ββββββββββββββββ
β Query β HEAD β feat_pk-cardinality-estimation β Change β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β QQuery 0 β 1.25 / 4.12 Β±5.61 / 15.33 ms β 1.26 / 4.13 Β±5.59 / 15.30 ms β no change β
β QQuery 1 β 12.55 / 12.80 Β±0.25 / 13.28 ms β 12.35 / 12.59 Β±0.19 / 12.86 ms β no change β
β QQuery 2 β 36.29 / 36.78 Β±0.31 / 37.15 ms β 36.08 / 36.47 Β±0.30 / 36.82 ms β no change β
β QQuery 3 β 31.96 / 32.52 Β±0.47 / 33.35 ms β 31.52 / 31.81 Β±0.23 / 32.20 ms β no change β
β QQuery 4 β 236.20 / 239.86 Β±4.01 / 247.33 ms β 233.72 / 237.20 Β±2.98 / 242.64 ms β no change β
β QQuery 5 β 277.55 / 280.03 Β±1.87 / 282.55 ms β 280.95 / 285.46 Β±3.77 / 290.23 ms β no change β
β QQuery 6 β 1.27 / 1.41 Β±0.22 / 1.85 ms β 1.28 / 1.43 Β±0.21 / 1.84 ms β no change β
β QQuery 7 β 13.50 / 13.80 Β±0.19 / 14.09 ms β 13.24 / 13.42 Β±0.09 / 13.50 ms β no change β
β QQuery 8 β 335.23 / 341.17 Β±4.56 / 348.14 ms β 328.93 / 342.63 Β±12.17 / 360.10 ms β no change β
β QQuery 9 β 479.08 / 490.67 Β±14.24 / 517.07 ms β 453.51 / 471.05 Β±9.57 / 482.85 ms β no change β
β QQuery 10 β 72.25 / 73.20 Β±1.41 / 75.99 ms β 70.76 / 74.66 Β±3.56 / 79.87 ms β no change β
β QQuery 11 β 82.32 / 82.88 Β±0.51 / 83.71 ms β 81.58 / 84.21 Β±3.25 / 90.44 ms β no change β
β QQuery 12 β 281.73 / 286.03 Β±2.75 / 290.05 ms β 276.99 / 284.38 Β±4.60 / 290.60 ms β no change β
β QQuery 13 β 372.19 / 387.03 Β±10.70 / 400.02 ms β 398.31 / 407.39 Β±8.36 / 422.19 ms β 1.05x slower β
β QQuery 14 β 284.65 / 291.91 Β±4.43 / 297.87 ms β 296.60 / 307.49 Β±7.87 / 319.95 ms β 1.05x slower β
β QQuery 15 β 280.43 / 287.07 Β±9.44 / 305.03 ms β 297.48 / 311.86 Β±14.52 / 339.23 ms β 1.09x slower β
β QQuery 16 β 628.84 / 639.82 Β±7.97 / 652.59 ms β 654.29 / 677.07 Β±15.95 / 700.59 ms β 1.06x slower β
β QQuery 17 β 639.30 / 649.84 Β±6.96 / 657.74 ms β 683.25 / 689.26 Β±8.40 / 705.90 ms β 1.06x slower β
β QQuery 18 β 1263.53 / 1291.90 Β±18.56 / 1314.24 ms β 1388.15 / 1410.45 Β±14.17 / 1429.43 ms β 1.09x slower β
β QQuery 19 β 28.35 / 35.29 Β±7.39 / 45.21 ms β 29.35 / 49.30 Β±35.82 / 120.83 ms β 1.40x slower β
β QQuery 20 β 522.52 / 533.07 Β±8.59 / 544.29 ms β 537.82 / 548.62 Β±13.71 / 574.90 ms β no change β
β QQuery 21 β 519.20 / 523.49 Β±4.92 / 532.80 ms β 540.89 / 546.38 Β±6.62 / 558.62 ms β no change β
β QQuery 22 β 992.37 / 1023.87 Β±20.51 / 1052.09 ms β 1040.70 / 1060.33 Β±20.30 / 1091.82 ms β no change β
β QQuery 23 β 3108.38 / 3148.06 Β±28.26 / 3191.80 ms β 3185.17 / 3259.04 Β±50.81 / 3327.73 ms β no change β
β QQuery 24 β 41.93 / 46.39 Β±6.45 / 58.84 ms β 43.32 / 43.48 Β±0.12 / 43.59 ms β +1.07x faster β
β QQuery 25 β 110.73 / 116.43 Β±7.44 / 131.06 ms β 114.86 / 122.67 Β±8.64 / 138.73 ms β 1.05x slower β
β QQuery 26 β 41.89 / 42.90 Β±0.89 / 44.14 ms β 43.97 / 46.34 Β±3.06 / 52.38 ms β 1.08x slower β
β QQuery 27 β 515.24 / 523.51 Β±7.32 / 537.04 ms β 533.46 / 544.98 Β±11.25 / 562.71 ms β no change β
β QQuery 28 β 2917.70 / 2943.49 Β±15.82 / 2963.29 ms β 3033.30 / 3052.79 Β±14.79 / 3075.14 ms β no change β
β QQuery 29 β 41.26 / 55.50 Β±13.21 / 76.49 ms β 41.96 / 50.93 Β±10.02 / 68.86 ms β +1.09x faster β
β QQuery 30 β 308.06 / 312.69 Β±2.81 / 315.75 ms β 326.79 / 333.20 Β±5.70 / 340.16 ms β 1.07x slower β
β QQuery 31 β 286.17 / 292.18 Β±6.47 / 304.11 ms β 299.26 / 323.07 Β±15.09 / 346.91 ms β 1.11x slower β
β QQuery 32 β 945.02 / 1009.51 Β±38.58 / 1061.92 ms β 1021.14 / 1057.57 Β±19.95 / 1081.27 ms β no change β
β QQuery 33 β 1485.45 / 1534.51 Β±32.30 / 1581.91 ms β 1622.91 / 1667.77 Β±32.50 / 1702.79 ms β 1.09x slower β
β QQuery 34 β 1511.38 / 1543.42 Β±23.21 / 1575.47 ms β 1647.61 / 1708.64 Β±44.82 / 1770.23 ms β 1.11x slower β
β QQuery 35 β 287.76 / 313.25 Β±26.58 / 364.03 ms β 333.42 / 353.95 Β±31.93 / 417.35 ms β 1.13x slower β
β QQuery 36 β 68.09 / 78.16 Β±8.90 / 89.08 ms β 69.69 / 76.42 Β±4.94 / 83.93 ms β no change β
β QQuery 37 β 36.44 / 43.15 Β±7.75 / 56.12 ms β 37.77 / 43.39 Β±7.42 / 57.95 ms β no change β
β QQuery 38 β 43.53 / 44.69 Β±0.63 / 45.40 ms β 44.73 / 49.31 Β±5.55 / 60.19 ms β 1.10x slower β
β QQuery 39 β 151.31 / 156.50 Β±4.22 / 161.62 ms β 160.27 / 173.47 Β±12.34 / 191.54 ms β 1.11x slower β
β QQuery 40 β 14.80 / 16.15 Β±2.07 / 20.27 ms β 15.43 / 16.66 Β±1.32 / 19.07 ms β no change β
β QQuery 41 β 14.25 / 14.36 Β±0.11 / 14.57 ms β 14.86 / 16.49 Β±2.58 / 21.63 ms β 1.15x slower β
β QQuery 42 β 13.76 / 14.08 Β±0.24 / 14.44 ms β 14.48 / 14.72 Β±0.23 / 15.01 ms β no change β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββ³βββββββββββββ
β Benchmark Summary β β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Total Time (HEAD) β 19807.48ms β
β Total Time (feat_pk-cardinality-estimation) β 20842.49ms β
β Average Time (HEAD) β 460.64ms β
β Average Time (feat_pk-cardinality-estimation) β 484.71ms β
β Queries Faster β 2 β
β Queries Slower β 17 β
β Queries with No Change β 24 β
β Queries with Failure β 0 β
βββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββββ
```
</p>
</details>
<details><summary>Resource Usage</summary>
**clickbench_partitioned β base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 100.0s |
| Peak memory | 10.7 GiB |
| Avg memory | 4.4 GiB |
| CPU user | 1009.2s |
| CPU sys | 75.1s |
| Peak spill | 0 B |
**clickbench_partitioned β branch**
| Metric | Value |
|--------|-------|
| Wall time | 105.0s |
| Peak memory | 10.8 GiB |
| Avg memory | 4.5 GiB |
| CPU user | 1056.2s |
| CPU sys | 83.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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357588835
π€ Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/24520#issuecomment-5357542286)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c5357542286-1807-q472x 6.12.85+ #1 SMP Sat Jun 27 09:31:30 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 feat/pk-cardinality-estimation (32d17cb5dab2fb0f8129e737e13f0b010d72c38e) to 858d3bf (merge-base) [diff](https://github.com/apache/datafusion/compare/858d3bf7f9d36b0668946db7fb9c006892a95309..32d17cb5dab2fb0f8129e737e13f0b010d72c38e)
<details><summary>Run configuration</summary>
```yaml
run benchmark tpcds
```
</details>
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5360166874
@Rich-T-kid are you perhaps interested in reviewing this one?
--
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357781413
π€ Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/24520#issuecomment-5357542286)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
Comparing feat/pk-cardinality-estimation (32d17cb5dab2fb0f8129e737e13f0b010d72c38e) to 858d3bf (merge-base) [diff](https://github.com/apache/datafusion/compare/858d3bf7f9d36b0668946db7fb9c006892a95309..32d17cb5dab2fb0f8129e737e13f0b010d72c38e)
<details><summary>Run configuration</summary>
```yaml
run benchmark tpch
```
</details>
<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 feat_pk-cardinality-estimation
--------------------
Benchmark tpch_sf1.json
--------------------
βββββββββββββ³βββββββββββ³βββββββββββββββββββββββββββββββββ³βββββββββββββββ
β Query β HEAD β feat_pk-cardinality-estimation β Change β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β QQuery 1 β 38.10 ms β 38.01 ms β no change β
β QQuery 2 β 18.90 ms β 18.93 ms β no change β
β QQuery 3 β 33.29 ms β 31.79 ms β no change β
β QQuery 4 β 17.37 ms β 17.21 ms β no change β
β QQuery 5 β 37.05 ms β 37.48 ms β no change β
β QQuery 6 β 16.00 ms β 16.11 ms β no change β
β QQuery 7 β 42.74 ms β 43.45 ms β no change β
β QQuery 8 β 41.89 ms β 41.97 ms β no change β
β QQuery 9 β 48.56 ms β 49.35 ms β no change β
β QQuery 10 β 41.69 ms β 41.79 ms β no change β
β QQuery 11 β 13.32 ms β 13.12 ms β no change β
β QQuery 12 β 24.12 ms β 24.17 ms β no change β
β QQuery 13 β 31.28 ms β 31.80 ms β no change β
β QQuery 14 β 23.07 ms β 22.91 ms β no change β
β QQuery 15 β 30.95 ms β 30.39 ms β no change β
β QQuery 16 β 14.36 ms β 14.38 ms β no change β
β QQuery 17 β 68.96 ms β 75.48 ms β 1.09x slower β
β QQuery 18 β 58.60 ms β 61.71 ms β 1.05x slower β
β QQuery 19 β 32.36 ms β 33.65 ms β no change β
β QQuery 20 β 31.40 ms β 31.92 ms β no change β
β QQuery 21 β 54.68 ms β 56.89 ms β no change β
β QQuery 22 β 13.74 ms β 14.15 ms β no change β
βββββββββββββ΄βββββββββββ΄βββββββββββββββββββββββββββββββββ΄βββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββ³βββββββββββ
β Benchmark Summary β β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Total Time (HEAD) β 732.44ms β
β Total Time (feat_pk-cardinality-estimation) β 746.67ms β
β Average Time (HEAD) β 33.29ms β
β Average Time (feat_pk-cardinality-estimation) β 33.94ms β
β Queries Faster β 0 β
β Queries Slower β 2 β
β Queries with No Change β 20 β
β Queries with Failure β 0 β
βββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββ
Distribution per query (min / mean Β±stddev / max):
Comparing HEAD and feat_pk-cardinality-estimation
--------------------
Benchmark tpch_sf1.json
--------------------
βββββββββββββ³βββββββββββββββββββββββββββββββββ³βββββββββββββββββββββββββββββββββ³ββββββββββββββββ
β Query β HEAD β feat_pk-cardinality-estimation β Change β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β QQuery 1 β 38.10 / 39.00 Β±1.02 / 40.97 ms β 38.01 / 38.84 Β±1.00 / 40.72 ms β no change β
β QQuery 2 β 18.90 / 19.58 Β±0.40 / 20.07 ms β 18.93 / 19.68 Β±0.61 / 20.80 ms β no change β
β QQuery 3 β 33.29 / 34.36 Β±1.31 / 36.34 ms β 31.79 / 32.53 Β±0.65 / 33.62 ms β +1.06x faster β
β QQuery 4 β 17.37 / 17.47 Β±0.08 / 17.61 ms β 17.21 / 17.33 Β±0.13 / 17.57 ms β no change β
β QQuery 5 β 37.05 / 38.64 Β±1.14 / 39.93 ms β 37.48 / 40.02 Β±1.80 / 42.98 ms β no change β
β QQuery 6 β 16.00 / 17.15 Β±1.24 / 18.92 ms β 16.11 / 17.31 Β±1.24 / 19.01 ms β no change β
β QQuery 7 β 42.74 / 44.72 Β±1.26 / 46.11 ms β 43.45 / 44.67 Β±1.01 / 46.14 ms β no change β
β QQuery 8 β 41.89 / 42.02 Β±0.10 / 42.19 ms β 41.97 / 42.26 Β±0.38 / 43.00 ms β no change β
β QQuery 9 β 48.56 / 51.02 Β±2.25 / 54.66 ms β 49.35 / 50.41 Β±0.66 / 51.41 ms β no change β
β QQuery 10 β 41.69 / 41.97 Β±0.18 / 42.22 ms β 41.79 / 42.42 Β±1.08 / 44.57 ms β no change β
β QQuery 11 β 13.32 / 13.44 Β±0.17 / 13.78 ms β 13.12 / 13.38 Β±0.26 / 13.87 ms β no change β
β QQuery 12 β 24.12 / 24.35 Β±0.27 / 24.86 ms β 24.17 / 24.43 Β±0.18 / 24.65 ms β no change β
β QQuery 13 β 31.28 / 33.50 Β±2.40 / 37.91 ms β 31.80 / 33.20 Β±1.33 / 35.47 ms β no change β
β QQuery 14 β 23.07 / 23.29 Β±0.17 / 23.53 ms β 22.91 / 23.08 Β±0.16 / 23.37 ms β no change β
β QQuery 15 β 30.95 / 32.54 Β±1.35 / 34.49 ms β 30.39 / 31.02 Β±0.39 / 31.46 ms β no change β
β QQuery 16 β 14.36 / 14.62 Β±0.19 / 14.84 ms β 14.38 / 14.43 Β±0.03 / 14.48 ms β no change β
β QQuery 17 β 68.96 / 69.55 Β±0.57 / 70.29 ms β 75.48 / 76.20 Β±0.61 / 77.27 ms β 1.10x slower β
β QQuery 18 β 58.60 / 59.52 Β±0.65 / 60.48 ms β 61.71 / 63.74 Β±2.09 / 67.63 ms β 1.07x slower β
β QQuery 19 β 32.36 / 33.57 Β±1.55 / 36.59 ms β 33.65 / 34.19 Β±0.57 / 35.25 ms β no change β
β QQuery 20 β 31.40 / 33.08 Β±1.01 / 34.18 ms β 31.92 / 32.52 Β±0.32 / 32.84 ms β no change β
β QQuery 21 β 54.68 / 56.14 Β±0.76 / 56.82 ms β 56.89 / 58.39 Β±1.19 / 59.94 ms β no change β
β QQuery 22 β 13.74 / 14.16 Β±0.61 / 15.35 ms β 14.15 / 14.48 Β±0.49 / 15.42 ms β no change β
βββββββββββββ΄βββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ΄ββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββ³βββββββββββ
β Benchmark Summary β β
β‘βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Total Time (HEAD) β 753.70ms β
β Total Time (feat_pk-cardinality-estimation) β 764.51ms β
β Average Time (HEAD) β 34.26ms β
β Average Time (feat_pk-cardinality-estimation) β 34.75ms β
β Queries Faster β 1 β
β Queries Slower β 2 β
β Queries with No Change β 19 β
β Queries with Failure β 0 β
βββββββββββββββββββββββββββββββββββββββββββββββββ΄βββββββββββ
```
</p>
</details>
<details><summary>Resource Usage</summary>
**tpch β base (merge-base)**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 1.3 GiB |
| Avg memory | 525.9 MiB |
| CPU user | 21.5s |
| CPU sys | 1.7s |
| Peak spill | 0 B |
**tpch β branch**
| Metric | Value |
|--------|-------|
| Wall time | 5.0s |
| Peak memory | 1.2 GiB |
| Avg memory | 520.3 MiB |
| CPU user | 22.1s |
| CPU sys | 1.6s |
| 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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "jayzhan211 (via GitHub)" <gi...@apache.org>.
jayzhan211 commented on code in PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#discussion_r3835621148
##########
datafusion/physical-plan/src/filter.rs:
##########
Review Comment:
I believe this comment belonged to `collect_equality_columns`
--
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan merged PR #24520:
URL: https://github.com/apache/datafusion/pull/24520
--
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "Rich-T-kid (via GitHub)" <gi...@apache.org>.
Rich-T-kid commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5360533737
Yes I'd be happy too. I may need a bit of time to catch up to speed so hopefully tonight
--
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357347867
## [Codecov](https://app.codecov.io/gh/apache/datafusion/pull/24520?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `97.59036%` with `2 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 81.31%. Comparing base ([`858d3bf`](https://app.codecov.io/gh/apache/datafusion/commit/858d3bf7f9d36b0668946db7fb9c006892a95309?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`32d17cb`](https://app.codecov.io/gh/apache/datafusion/commit/32d17cb5dab2fb0f8129e737e13f0b010d72c38e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 2 commits behind head on main.
| [Files with missing lines](https://app.codecov.io/gh/apache/datafusion/pull/24520?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [datafusion/datasource/src/file\_scan\_config/mod.rs](https://app.codecov.io/gh/apache/datafusion/pull/24520?src=pr&el=tree&filepath=datafusion%2Fdatasource%2Fsrc%2Ffile_scan_config%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZGF0YWZ1c2lvbi9kYXRhc291cmNlL3NyYy9maWxlX3NjYW5fY29uZmlnL21vZC5ycw==) | 97.59% | [2 Missing :warning: ](https://app.codecov.io/gh/apache/datafusion/pull/24520?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #24520 +/- ##
========================================
Coverage 81.30% 81.31%
========================================
Files 1117 1117
Lines 395881 395993 +112
Branches 395881 395993 +112
========================================
+ Hits 321886 321992 +106
- Misses 55178 55180 +2
- Partials 18817 18821 +4
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/datafusion/pull/24520?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "asolimando (via GitHub)" <gi...@apache.org>.
asolimando commented on code in PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#discussion_r3832008623
##########
datafusion/physical-plan/src/filter.rs:
##########
@@ -406,6 +411,10 @@ impl FilterExec {
}
};
+ let num_rows = match (match_limit, num_rows.get_value()) {
Review Comment:
I think we should rescale accordingly `byte_size` and `total_byte_size` after limiting `num_rows`
##########
datafusion/datasource/src/file_scan_config/mod.rs:
##########
@@ -2133,6 +2161,117 @@ mod tests {
}
// sets default for configs that play no role in projections
+ fn config_with_constraints(
+ table_schema: TableSchema,
+ statistics: Statistics,
+ constraints: Vec<Constraint>,
+ projection: Option<Vec<usize>>,
+ ) -> FileScanConfig {
+ FileScanConfigBuilder::new(
+ ObjectStoreUrl::parse("test:///").unwrap(),
+ Arc::new(MockSource::new(table_schema)),
+ )
+ .with_statistics(statistics)
+ .with_constraints(Constraints::new_unverified(constraints))
+ .with_projection_indices(projection)
+ .unwrap()
+ .build()
+ }
+
+ /// A key column has one distinct value per row, which no file format records.
+ #[test]
+ fn key_columns_report_a_distinct_count() {
+ let file_schema = Arc::new(Schema::new(vec![
+ Field::new("id", DataType::Int32, false),
+ Field::new("part", DataType::Int32, false),
+ Field::new("code", DataType::Int32, true),
+ ]));
+ let table_schema = TableSchema::builder(Arc::clone(&file_schema)).build();
+ let mut statistics = Statistics::new_unknown(&file_schema);
+ statistics.num_rows = Precision::Exact(100);
+ // A unique column may repeat NULL, which is not a distinct value.
+ statistics.column_statistics[2].null_count = Precision::Exact(10);
+
+ let stats = |constraints| {
+ config_with_constraints(
+ table_schema.clone(),
+ statistics.clone(),
+ constraints,
+ None,
+ )
+ .statistics()
+ };
+
+ // A primary key cannot be null, so the count is as exact as the row count.
+ let primary_key = stats(vec![Constraint::PrimaryKey(vec![0])]);
+ assert_eq!(
+ primary_key.column_statistics[0].distinct_count,
+ Precision::Exact(100)
+ );
+ assert_eq!(
+ primary_key.column_statistics[1].distinct_count,
+ Precision::Absent
+ );
+
+ // The nulls a unique column may repeat are known here, so this is exact too.
+ let unique = stats(vec![Constraint::Unique(vec![2])]);
+ assert_eq!(
+ unique.column_statistics[2].distinct_count,
+ Precision::Exact(90)
+ );
+
+ // With an unknown null count it is not.
Review Comment:
Nit: I'd repeat "not exact." as it's not evident it reads after the previous comment
##########
datafusion/datasource/src/file_scan_config/mod.rs:
##########
@@ -568,6 +570,32 @@ impl FileScanConfigBuilder {
}
}
+/// Records that a key column holds one distinct value per row, which no file format
+/// stores. Single-column keys only: a composite key says nothing about its columns.
+fn add_key_distinct_counts(constraints: &Constraints, statistics: &mut Statistics) {
Review Comment:
Minor: I guess this would be applicable as-is to more table providers, it's fine to do as follow-up but maybe we could move the function somewhere else higher up in `datasource`?
--
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357586655
π€ Benchmark running (GKE) | [trigger](https://github.com/apache/datafusion/pull/24520#issuecomment-5357542286)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB) | `Linux bench-c5357542286-1808-vjpzh 6.12.85+ #1 SMP Sat Jun 27 09:31:30 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 feat/pk-cardinality-estimation (32d17cb5dab2fb0f8129e737e13f0b010d72c38e) to 858d3bf (merge-base) [diff](https://github.com/apache/datafusion/compare/858d3bf7f9d36b0668946db7fb9c006892a95309..32d17cb5dab2fb0f8129e737e13f0b010d72c38e)
<details><summary>Run configuration</summary>
```yaml
run benchmark tpch
```
</details>
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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "adriangbot (via GitHub)" <gi...@apache.org>.
adriangbot commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357803228
π€ Benchmark completed (GKE) | [trigger](https://github.com/apache/datafusion/pull/24520#issuecomment-5357542286)
**Instance:** `c4a-highmem-16` (12 vCPU / 65 GiB)
Comparing feat/pk-cardinality-estimation (32d17cb5dab2fb0f8129e737e13f0b010d72c38e) to 858d3bf (merge-base) [diff](https://github.com/apache/datafusion/compare/858d3bf7f9d36b0668946db7fb9c006892a95309..32d17cb5dab2fb0f8129e737e13f0b010d72c38e)
<details><summary>Run configuration</summary>
```yaml
run benchmark tpcds
```
</details>
<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 feat_pk-cardinality-estimation
--------------------
Benchmark tpcds_sf1.json
--------------------
βββββββββββββ³βββββββββββββ³βββββββββββββββββββββββββββββββββ³ββββββββββββββββ
β Query β HEAD β feat_pk-cardinality-estimation β Change β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β QQuery 1 β 5.82 ms β 5.66 ms β no change β
β QQuery 2 β 81.92 ms β 80.83 ms β no change β
β QQuery 3 β 28.90 ms β 28.93 ms β no change β
β QQuery 4 β 503.98 ms β 500.14 ms β no change β
β QQuery 5 β 51.70 ms β 51.77 ms β no change β
β QQuery 6 β 36.62 ms β 35.94 ms β no change β
β QQuery 7 β 94.76 ms β 94.34 ms β no change β
β QQuery 8 β 37.33 ms β 36.73 ms β no change β
β QQuery 9 β 51.28 ms β 50.88 ms β no change β
β QQuery 10 β 62.43 ms β 62.95 ms β no change β
β QQuery 11 β 310.47 ms β 315.66 ms β no change β
β QQuery 12 β 29.20 ms β 29.21 ms β no change β
β QQuery 13 β 117.89 ms β 117.88 ms β no change β
β QQuery 14 β 416.36 ms β 415.77 ms β no change β
β QQuery 15 β 58.81 ms β 58.42 ms β no change β
β QQuery 16 β 6.77 ms β 6.84 ms β no change β
β QQuery 17 β 80.56 ms β 80.13 ms β no change β
β QQuery 18 β 123.43 ms β 124.60 ms β no change β
β QQuery 19 β 41.42 ms β 41.40 ms β no change β
β QQuery 20 β 35.95 ms β 36.10 ms β no change β
β QQuery 21 β 17.30 ms β 17.58 ms β no change β
β QQuery 22 β 62.61 ms β 63.94 ms β no change β
β QQuery 23 β 351.95 ms β 313.25 ms β +1.12x faster β
β QQuery 24 β 224.80 ms β 225.15 ms β no change β
β QQuery 25 β 110.27 ms β 110.09 ms β no change β
β QQuery 26 β 59.17 ms β 58.34 ms β no change β
β QQuery 27 β 6.57 ms β 6.54 ms β no change β
β QQuery 28 β 60.16 ms β 55.71 ms β +1.08x faster β
β QQuery 29 β 96.78 ms β 96.50 ms β no change β
β QQuery 30 β 33.26 ms β 32.65 ms β no change β
β QQuery 31 β 111.12 ms β 109.91 ms β no change β
β QQuery 32 β 20.77 ms β 20.57 ms β no change β
β QQuery 33 β 38.39 ms β 37.63 ms β no change β
β QQuery 34 β 10.32 ms β 10.12 ms β no change β
β QQuery 35 β 73.31 ms β 73.71 ms β no change β
β QQuery 36 β 6.04 ms β 5.82 ms β no change β
β QQuery 37 β 7.04 ms β 6.96 ms β no change β
β QQuery 38 β 62.73 ms β 62.48 ms β no change β
β QQuery 39 β 90.81 ms β 90.42 ms β no change β
β QQuery 40 β 23.32 ms β 23.35 ms β no change β
β QQuery 41 β 11.35 ms β 11.32 ms β no change β
β QQuery 42 β 23.61 ms β 23.57 ms β no change β
β QQuery 43 β 5.30 ms β 5.28 ms β no change β
β QQuery 44 β 9.34 ms β 9.42 ms β no change β
β QQuery 45 β 39.39 ms β 38.50 ms β no change β
β QQuery 46 β 12.37 ms β 12.04 ms β no change β
β QQuery 47 β 229.70 ms β 228.18 ms β no change β
β QQuery 48 β 95.42 ms β 95.20 ms β no change β
β QQuery 49 β 76.60 ms β 76.44 ms β no change β
β QQuery 50 β 59.34 ms β 59.28 ms β no change β
β QQuery 51 β 89.62 ms β 91.81 ms β no change β
β QQuery 52 β 24.18 ms β 24.00 ms β no change β
β QQuery 53 β 29.57 ms β 29.12 ms β no change β
β QQuery 54 β 55.61 ms β 54.84 ms β no change β
β QQuery 55 β 23.45 ms β 23.51 ms β no change β
β QQuery 56 β 38.80 ms β 39.03 ms β no change β
β QQuery 57 β 177.05 ms β 176.59 ms β no change β
β QQuery 58 β 115.03 ms β 113.89 ms β no change β
β QQuery 59 β 119.19 ms β 118.62 ms β no change β
β QQuery 60 β 39.76 ms β 39.50 ms β no change β
β QQuery 61 β 12.79 ms β 12.59 ms β no change β
β QQuery 62 β 47.61 ms β 46.58 ms β no change β
β QQuery 63 β 29.36 ms β 29.23 ms β no change β
β QQuery 64 β 409.49 ms β 407.64 ms β no change β
β QQuery 65 β 119.99 ms β 124.13 ms β no change β
β QQuery 66 β 82.66 ms β 82.55 ms β no change β
β QQuery 67 β 244.87 ms β 254.09 ms β no change β
β QQuery 68 β 12.09 ms β 12.41 ms β no change β
β QQuery 69 β 57.23 ms β 57.35 ms β no change β
β QQuery 70 β 107.40 ms β 106.54 ms β no change β
β QQuery 71 β 35.00 ms β 35.17 ms β no change β
β QQuery 72 β 2028.66 ms β 2098.47 ms β no change β
β QQuery 73 β 9.78 ms β 9.83 ms β no change β
β QQuery 74 β 175.09 ms β 174.11 ms β no change β
β QQuery 75 β 149.69 ms β 149.62 ms β no change β
β QQuery 76 β 35.54 ms β 35.51 ms β no change β
β QQuery 77 β 60.95 ms β 61.54 ms β no change β
β QQuery 78 β 197.35 ms β 196.15 ms β no change β
β QQuery 79 β 67.26 ms β 66.68 ms β no change β
β QQuery 80 β 98.83 ms β 99.55 ms β no change β
β QQuery 81 β 26.19 ms β 26.29 ms β no change β
β QQuery 82 β 16.43 ms β 16.23 ms β no change β
β QQuery 83 β 40.05 ms β 39.76 ms β no change β
β QQuery 84 β 30.09 ms β 29.83 ms β no change β
β QQuery 85 β 107.26 ms β 106.29 ms β no change β
β QQuery 86 β 25.53 ms β 25.40 ms β no change β
β QQuery 87 β 62.21 ms β 61.97 ms β no change β
β QQuery 88 β 64.09 ms β 62.86 ms β no change β
β QQuery 89 β 35.80 ms β 35.27 ms β no change β
β QQuery 90 β 17.37 ms β 17.33 ms β no change β
β QQuery 91 β 46.64 ms β 46.34 ms β no change β
β QQuery 92 β 29.93 ms β 29.86 ms β no change β
β QQuery 93 β 50.71 ms β 50.51 ms β no change β
β QQuery 94 β 38.18 ms β 37.87 ms β no change β
β QQuery 95 β 80.66 ms β 78.88 ms β no change β
β QQuery 96 β 24.27 ms β 23.67 ms β no change β
β QQuery 97 β 46.63 ms β 46.91 ms β no change β
β QQuery 98 β 42.83 ms β 42.99 ms β no change β
β QQuery 99 β 70.83 ms β 70.53 ms β no change β
βββββββββββββ΄βββββββββββββ΄βββββββββββββββββββββββββββββββββ΄ββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββ³ββββββββββββ
β Benchmark Summary β β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Total Time (HEAD) β 9754.36ms β
β Total Time (feat_pk-cardinality-estimation) β 9773.62ms β
β Average Time (HEAD) β 98.53ms β
β Average Time (feat_pk-cardinality-estimation) β 98.72ms β
β Queries Faster β 2 β
β Queries Slower β 0 β
β Queries with No Change β 97 β
β Queries with Failure β 0 β
βββββββββββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββ
Distribution per query (min / mean Β±stddev / max):
Comparing HEAD and feat_pk-cardinality-estimation
--------------------
Benchmark tpcds_sf1.json
--------------------
βββββββββββββ³ββββββββββββββββββββββββββββββββββββββββ³ββββββββββββββββββββββββββββββββββββββββ³ββββββββββββββββ
β Query β HEAD β feat_pk-cardinality-estimation β Change β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β QQuery 1 β 5.82 / 6.37 Β±0.84 / 8.03 ms β 5.66 / 6.15 Β±0.94 / 8.02 ms β no change β
β QQuery 2 β 81.92 / 82.51 Β±0.36 / 82.99 ms β 80.83 / 81.30 Β±0.26 / 81.62 ms β no change β
β QQuery 3 β 28.90 / 29.21 Β±0.20 / 29.42 ms β 28.93 / 29.36 Β±0.23 / 29.57 ms β no change β
β QQuery 4 β 503.98 / 506.62 Β±1.68 / 508.24 ms β 500.14 / 506.11 Β±4.64 / 513.28 ms β no change β
β QQuery 5 β 51.70 / 52.60 Β±0.73 / 53.79 ms β 51.77 / 52.09 Β±0.21 / 52.37 ms β no change β
β QQuery 6 β 36.62 / 36.92 Β±0.19 / 37.16 ms β 35.94 / 36.41 Β±0.35 / 36.92 ms β no change β
β QQuery 7 β 94.76 / 96.34 Β±1.65 / 99.54 ms β 94.34 / 95.63 Β±1.76 / 99.11 ms β no change β
β QQuery 8 β 37.33 / 37.74 Β±0.46 / 38.64 ms β 36.73 / 37.76 Β±0.80 / 38.78 ms β no change β
β QQuery 9 β 51.28 / 53.40 Β±1.71 / 55.54 ms β 50.88 / 52.92 Β±1.59 / 55.08 ms β no change β
β QQuery 10 β 62.43 / 63.25 Β±0.62 / 64.24 ms β 62.95 / 63.23 Β±0.29 / 63.78 ms β no change β
β QQuery 11 β 310.47 / 316.95 Β±4.53 / 321.79 ms β 315.66 / 323.42 Β±6.05 / 330.50 ms β no change β
β QQuery 12 β 29.20 / 29.59 Β±0.27 / 30.04 ms β 29.21 / 29.60 Β±0.30 / 29.94 ms β no change β
β QQuery 13 β 117.89 / 120.49 Β±2.66 / 125.33 ms β 117.88 / 119.54 Β±1.34 / 121.97 ms β no change β
β QQuery 14 β 416.36 / 424.85 Β±6.14 / 432.37 ms β 415.77 / 424.62 Β±7.22 / 436.31 ms β no change β
β QQuery 15 β 58.81 / 59.68 Β±0.58 / 60.44 ms β 58.42 / 59.51 Β±0.71 / 60.52 ms β no change β
β QQuery 16 β 6.77 / 6.90 Β±0.20 / 7.31 ms β 6.84 / 7.04 Β±0.22 / 7.45 ms β no change β
β QQuery 17 β 80.56 / 81.75 Β±1.28 / 84.11 ms β 80.13 / 81.32 Β±1.28 / 83.73 ms β no change β
β QQuery 18 β 123.43 / 125.36 Β±1.08 / 126.57 ms β 124.60 / 128.53 Β±5.23 / 138.78 ms β no change β
β QQuery 19 β 41.42 / 41.79 Β±0.38 / 42.49 ms β 41.40 / 41.73 Β±0.28 / 42.17 ms β no change β
β QQuery 20 β 35.95 / 37.40 Β±1.65 / 40.58 ms β 36.10 / 37.46 Β±1.32 / 39.49 ms β no change β
β QQuery 21 β 17.30 / 18.25 Β±1.35 / 20.93 ms β 17.58 / 17.89 Β±0.16 / 18.02 ms β no change β
β QQuery 22 β 62.61 / 64.45 Β±1.17 / 66.23 ms β 63.94 / 64.92 Β±0.99 / 66.45 ms β no change β
β QQuery 23 β 351.95 / 356.03 Β±4.41 / 363.23 ms β 313.25 / 320.59 Β±4.60 / 326.86 ms β +1.11x faster β
β QQuery 24 β 224.80 / 227.68 Β±3.73 / 235.03 ms β 225.15 / 227.48 Β±3.57 / 234.50 ms β no change β
β QQuery 25 β 110.27 / 111.05 Β±0.91 / 112.77 ms β 110.09 / 110.58 Β±0.34 / 111.04 ms β no change β
β QQuery 26 β 59.17 / 60.29 Β±1.38 / 63.02 ms β 58.34 / 60.97 Β±2.91 / 65.04 ms β no change β
β QQuery 27 β 6.57 / 6.72 Β±0.10 / 6.88 ms β 6.54 / 6.76 Β±0.12 / 6.87 ms β no change β
β QQuery 28 β 60.16 / 61.12 Β±0.66 / 61.99 ms β 55.71 / 59.12 Β±2.85 / 62.85 ms β no change β
β QQuery 29 β 96.78 / 99.92 Β±5.29 / 110.43 ms β 96.50 / 98.15 Β±1.06 / 99.21 ms β no change β
β QQuery 30 β 33.26 / 33.54 Β±0.27 / 34.05 ms β 32.65 / 34.05 Β±1.39 / 36.71 ms β no change β
β QQuery 31 β 111.12 / 111.56 Β±0.25 / 111.77 ms β 109.91 / 111.37 Β±1.43 / 114.09 ms β no change β
β QQuery 32 β 20.77 / 21.05 Β±0.20 / 21.40 ms β 20.57 / 20.77 Β±0.32 / 21.41 ms β no change β
β QQuery 33 β 38.39 / 39.09 Β±0.85 / 40.57 ms β 37.63 / 38.14 Β±0.39 / 38.66 ms β no change β
β QQuery 34 β 10.32 / 10.63 Β±0.38 / 11.38 ms β 10.12 / 10.27 Β±0.19 / 10.65 ms β no change β
β QQuery 35 β 73.31 / 74.31 Β±0.89 / 75.83 ms β 73.71 / 74.47 Β±0.75 / 75.64 ms β no change β
β QQuery 36 β 6.04 / 6.21 Β±0.20 / 6.60 ms β 5.82 / 5.98 Β±0.13 / 6.23 ms β no change β
β QQuery 37 β 7.04 / 7.18 Β±0.09 / 7.27 ms β 6.96 / 7.02 Β±0.04 / 7.06 ms β no change β
β QQuery 38 β 62.73 / 63.31 Β±0.32 / 63.69 ms β 62.48 / 63.07 Β±0.34 / 63.51 ms β no change β
β QQuery 39 β 90.81 / 91.85 Β±0.63 / 92.61 ms β 90.42 / 92.14 Β±1.19 / 93.92 ms β no change β
β QQuery 40 β 23.32 / 23.66 Β±0.36 / 24.32 ms β 23.35 / 23.60 Β±0.14 / 23.80 ms β no change β
β QQuery 41 β 11.35 / 11.53 Β±0.15 / 11.79 ms β 11.32 / 11.52 Β±0.21 / 11.90 ms β no change β
β QQuery 42 β 23.61 / 23.82 Β±0.20 / 24.15 ms β 23.57 / 23.95 Β±0.58 / 25.09 ms β no change β
β QQuery 43 β 5.30 / 5.46 Β±0.19 / 5.83 ms β 5.28 / 5.42 Β±0.20 / 5.83 ms β no change β
β QQuery 44 β 9.34 / 9.70 Β±0.23 / 10.03 ms β 9.42 / 9.49 Β±0.09 / 9.66 ms β no change β
β QQuery 45 β 39.39 / 40.01 Β±0.45 / 40.79 ms β 38.50 / 39.29 Β±0.44 / 39.80 ms β no change β
β QQuery 46 β 12.37 / 13.59 Β±1.74 / 16.99 ms β 12.04 / 12.34 Β±0.24 / 12.73 ms β +1.10x faster β
β QQuery 47 β 229.70 / 233.24 Β±3.51 / 239.12 ms β 228.18 / 232.85 Β±4.22 / 239.67 ms β no change β
β QQuery 48 β 95.42 / 96.42 Β±1.01 / 98.20 ms β 95.20 / 95.82 Β±0.42 / 96.41 ms β no change β
β QQuery 49 β 76.60 / 78.86 Β±3.34 / 85.49 ms β 76.44 / 77.28 Β±0.79 / 78.75 ms β no change β
β QQuery 50 β 59.34 / 60.55 Β±1.20 / 62.84 ms β 59.28 / 61.00 Β±1.64 / 63.54 ms β no change β
β QQuery 51 β 89.62 / 93.00 Β±1.73 / 94.45 ms β 91.81 / 92.49 Β±0.43 / 92.97 ms β no change β
β QQuery 52 β 24.18 / 24.38 Β±0.15 / 24.64 ms β 24.00 / 24.29 Β±0.20 / 24.55 ms β no change β
β QQuery 53 β 29.57 / 31.56 Β±2.69 / 36.79 ms β 29.12 / 29.52 Β±0.48 / 30.39 ms β +1.07x faster β
β QQuery 54 β 55.61 / 56.29 Β±0.35 / 56.59 ms β 54.84 / 56.61 Β±2.02 / 59.31 ms β no change β
β QQuery 55 β 23.45 / 23.98 Β±0.35 / 24.55 ms β 23.51 / 23.87 Β±0.36 / 24.55 ms β no change β
β QQuery 56 β 38.80 / 39.45 Β±0.67 / 40.72 ms β 39.03 / 39.24 Β±0.29 / 39.80 ms β no change β
β QQuery 57 β 177.05 / 179.37 Β±2.45 / 183.75 ms β 176.59 / 179.59 Β±3.37 / 186.04 ms β no change β
β QQuery 58 β 115.03 / 117.15 Β±1.84 / 120.21 ms β 113.89 / 114.98 Β±1.16 / 116.66 ms β no change β
β QQuery 59 β 119.19 / 119.98 Β±0.58 / 120.94 ms β 118.62 / 119.48 Β±1.23 / 121.89 ms β no change β
β QQuery 60 β 39.76 / 40.23 Β±0.30 / 40.56 ms β 39.50 / 39.96 Β±0.52 / 40.80 ms β no change β
β QQuery 61 β 12.79 / 13.87 Β±1.90 / 17.67 ms β 12.59 / 12.80 Β±0.13 / 12.95 ms β +1.08x faster β
β QQuery 62 β 47.61 / 48.30 Β±0.73 / 49.67 ms β 46.58 / 46.75 Β±0.15 / 46.96 ms β no change β
β QQuery 63 β 29.36 / 29.78 Β±0.52 / 30.79 ms β 29.23 / 30.85 Β±2.65 / 36.14 ms β no change β
β QQuery 64 β 409.49 / 413.10 Β±2.48 / 416.42 ms β 407.64 / 416.66 Β±7.17 / 428.26 ms β no change β
β QQuery 65 β 119.99 / 126.13 Β±3.54 / 131.01 ms β 124.13 / 125.10 Β±0.71 / 126.23 ms β no change β
β QQuery 66 β 82.66 / 83.79 Β±0.83 / 84.97 ms β 82.55 / 84.93 Β±3.96 / 92.83 ms β no change β
β QQuery 67 β 244.87 / 250.27 Β±4.71 / 257.87 ms β 254.09 / 262.54 Β±6.44 / 272.01 ms β no change β
β QQuery 68 β 12.09 / 12.30 Β±0.21 / 12.60 ms β 12.41 / 12.51 Β±0.10 / 12.69 ms β no change β
β QQuery 69 β 57.23 / 59.84 Β±4.47 / 68.76 ms β 57.35 / 57.57 Β±0.17 / 57.83 ms β no change β
β QQuery 70 β 107.40 / 110.69 Β±2.46 / 113.57 ms β 106.54 / 114.02 Β±10.72 / 135.13 ms β no change β
β QQuery 71 β 35.00 / 36.25 Β±1.25 / 38.65 ms β 35.17 / 35.84 Β±0.40 / 36.37 ms β no change β
β QQuery 72 β 2028.66 / 2130.29 Β±60.44 / 2200.41 ms β 2098.47 / 2163.02 Β±52.59 / 2249.50 ms β no change β
β QQuery 73 β 9.78 / 10.12 Β±0.22 / 10.47 ms β 9.83 / 10.07 Β±0.30 / 10.66 ms β no change β
β QQuery 74 β 175.09 / 177.84 Β±2.30 / 181.97 ms β 174.11 / 178.30 Β±4.45 / 184.98 ms β no change β
β QQuery 75 β 149.69 / 153.00 Β±3.04 / 157.27 ms β 149.62 / 152.42 Β±4.56 / 161.49 ms β no change β
β QQuery 76 β 35.54 / 35.75 Β±0.18 / 36.10 ms β 35.51 / 35.92 Β±0.35 / 36.54 ms β no change β
β QQuery 77 β 60.95 / 61.56 Β±0.46 / 62.12 ms β 61.54 / 62.17 Β±0.51 / 63.11 ms β no change β
β QQuery 78 β 197.35 / 202.45 Β±4.39 / 210.16 ms β 196.15 / 202.79 Β±4.21 / 207.97 ms β no change β
β QQuery 79 β 67.26 / 68.55 Β±2.39 / 73.33 ms β 66.68 / 67.03 Β±0.25 / 67.28 ms β no change β
β QQuery 80 β 98.83 / 100.41 Β±1.87 / 103.36 ms β 99.55 / 103.05 Β±4.84 / 112.64 ms β no change β
β QQuery 81 β 26.19 / 26.57 Β±0.19 / 26.72 ms β 26.29 / 26.43 Β±0.13 / 26.60 ms β no change β
β QQuery 82 β 16.43 / 16.52 Β±0.09 / 16.69 ms β 16.23 / 16.47 Β±0.13 / 16.60 ms β no change β
β QQuery 83 β 40.05 / 40.77 Β±0.72 / 42.13 ms β 39.76 / 40.18 Β±0.25 / 40.50 ms β no change β
β QQuery 84 β 30.09 / 32.54 Β±2.77 / 36.91 ms β 29.83 / 32.44 Β±3.14 / 36.87 ms β no change β
β QQuery 85 β 107.26 / 107.94 Β±0.57 / 108.60 ms β 106.29 / 107.92 Β±1.19 / 109.84 ms β no change β
β QQuery 86 β 25.53 / 26.17 Β±0.56 / 27.21 ms β 25.40 / 25.66 Β±0.17 / 25.86 ms β no change β
β QQuery 87 β 62.21 / 65.38 Β±2.36 / 68.87 ms β 61.97 / 63.55 Β±1.96 / 67.33 ms β no change β
β QQuery 88 β 64.09 / 64.36 Β±0.25 / 64.72 ms β 62.86 / 63.86 Β±0.60 / 64.70 ms β no change β
β QQuery 89 β 35.80 / 36.16 Β±0.42 / 36.75 ms β 35.27 / 35.69 Β±0.37 / 36.20 ms β no change β
β QQuery 90 β 17.37 / 17.70 Β±0.27 / 18.05 ms β 17.33 / 17.59 Β±0.17 / 17.85 ms β no change β
β QQuery 91 β 46.64 / 46.85 Β±0.13 / 46.96 ms β 46.34 / 46.77 Β±0.32 / 47.19 ms β no change β
β QQuery 92 β 29.93 / 32.64 Β±2.82 / 37.24 ms β 29.86 / 30.48 Β±0.98 / 32.43 ms β +1.07x faster β
β QQuery 93 β 50.71 / 51.45 Β±0.42 / 51.83 ms β 50.51 / 52.06 Β±2.43 / 56.85 ms β no change β
β QQuery 94 β 38.18 / 38.56 Β±0.28 / 38.91 ms β 37.87 / 38.33 Β±0.42 / 39.08 ms β no change β
β QQuery 95 β 80.66 / 81.22 Β±0.57 / 82.29 ms β 78.88 / 80.24 Β±0.74 / 81.04 ms β no change β
β QQuery 96 β 24.27 / 26.58 Β±2.99 / 32.01 ms β 23.67 / 23.99 Β±0.27 / 24.32 ms β +1.11x faster β
β QQuery 97 β 46.63 / 47.85 Β±0.99 / 49.54 ms β 46.91 / 48.59 Β±1.76 / 51.08 ms β no change β
β QQuery 98 β 42.83 / 43.60 Β±0.42 / 44.01 ms β 42.99 / 43.38 Β±0.49 / 44.34 ms β no change β
β QQuery 99 β 70.83 / 71.24 Β±0.31 / 71.64 ms β 70.53 / 71.01 Β±0.42 / 71.68 ms β no change β
βββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββ³ββββββββββββ
β Benchmark Summary β β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Total Time (HEAD) β 9994.52ms β
β Total Time (feat_pk-cardinality-estimation) β 9989.03ms β
β Average Time (HEAD) β 100.95ms β
β Average Time (feat_pk-cardinality-estimation) β 100.90ms β
β Queries Faster β 6 β
β Queries Slower β 0 β
β Queries with No Change β 93 β
β 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.4 GiB |
| CPU user | 221.7s |
| CPU sys | 5.6s |
| Peak spill | 0 B |
**tpcds β branch**
| Metric | Value |
|--------|-------|
| Wall time | 55.0s |
| Peak memory | 1.9 GiB |
| Avg memory | 1.3 GiB |
| CPU user | 224.8s |
| 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] feat: derive a distinct count from primary key and unique constraints [datafusion]
Posted by "Dandandan (via GitHub)" <gi...@apache.org>.
Dandandan commented on PR #24520:
URL: https://github.com/apache/datafusion/pull/24520#issuecomment-5357542286
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