Skip to content

feat(physical-plan): GroupColumn support for List / LargeList - #23648

Open
mzabaluev wants to merge 22 commits into
apache:mainfrom
mzabaluev:nested-group-column-for-lists
Open

feat(physical-plan): GroupColumn support for List / LargeList#23648
mzabaluev wants to merge 22 commits into
apache:mainfrom
mzabaluev:nested-group-column-for-lists

Conversation

@mzabaluev

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Rationale for this change

This adds column-native GroupColumn implementations for List<T> and LargeList<T>, so a GROUP BY containing these (along with other supported data types) no longer falls back from GroupValuesColumn to GroupValuesRows.

What changes are included in this PR?

Cherry-picked @zhuqi-lucas's changes in #22706 that pertained to List / LargeList, and made some optimizations.

Are these changes tested?

Cherry-picked the unit tests for the list module from #22706.
Added supported/unsupported cases for List in the group_column_supported_type_matches_make_group_column test.

Benchmarked in a proprietary application using several HashAggregate operations on 20 columns including two string lists, to about 8% cumulative improvement.

Are there any user-facing changes?

No.

mzabaluev and others added 3 commits July 16, 2026 14:32
This is a minimal cherry-pick of the changes in
apache#22706, adding GroupColumn
support specifically for List and LargeList data types.

Co-Authored-By: Qi Zhu <821684824@qq.com>
Saves allocation of a new array.
Comment on lines +109 to +113
for j in 0..lhs_len {
if !self.child.equal_to(lhs_start + j, &rhs_sublist, j) {
return false;
}
}

This comment was marked as resolved.

Comment on lines +128 to +130
for j in 0..n {
self.child.append_val(&sublist, j)?;
}

This comment was marked as resolved.

@codecov-commenter

codecov-commenter commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.49351% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.65%. Comparing base (3a4c310) to head (6f73226).

Files with missing lines Patch % Lines
...src/aggregates/group_values/multi_group_by/list.rs 96.69% 13 Missing and 9 partials ⚠️
.../src/aggregates/group_values/multi_group_by/mod.rs 95.19% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23648      +/-   ##
==========================================
+ Coverage   81.62%   81.65%   +0.03%     
==========================================
  Files        1123     1124       +1     
  Lines      409637   410327     +690     
  Branches   409637   410327     +690     
==========================================
+ Hits       334383   335070     +687     
- Misses      55624    55629       +5     
+ Partials    19630    19628       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment on lines +1075 to +1081
DataType::List(child_field) => {
let child = make_group_column(child_field.as_ref())?;
v.push(Box::new(list::ListGroupValueBuilder::<i32>::new(
Arc::clone(child_field),
child,
)));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about using ListGroupValueBuilder::<i32>. What happens when the concatenated length of all the children exceeds i32::MAX? I think ListGroupValueBuilder should drop the O: OffsetSizeTrait generic and always use usize to store its offsets.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand it, the build/take_n of this builder must produce a ListArray, with i32 offsets. So an overflow would result in an error.

@mzabaluev
mzabaluev requested a review from KonaeAkira July 17, 2026 00:03
Comment thread datafusion/physical-plan/src/aggregates/group_values/multi_group_by/list.rs Outdated
Comment thread datafusion/physical-plan/src/aggregates/group_values/multi_group_by/list.rs Outdated
Comment thread datafusion/physical-plan/src/aggregates/group_values/multi_group_by/list.rs Outdated
Comment thread datafusion/physical-plan/src/aggregates/group_values/multi_group_by/list.rs Outdated
Co-authored-by: Trương Hoàng Long <longtruong2411@gmail.com>
@mzabaluev-flarion
mzabaluev-flarion force-pushed the nested-group-column-for-lists branch from 7ee5048 to 553bd2e Compare July 17, 2026 09:52
Comment on lines -221 to -234
// First-n offsets: 0, off[1], ..., off[n].
let first_n_offsets: Vec<O> = self.offsets[..=n].to_vec();

// Remaining offsets shifted so that what was offsets[n] becomes 0.
// Overwrite the array in place.
// SAFETY: the write range is at most as large as offsets.len().
// Values in the possible overlap are read before being overwritten.
unsafe {
let dst = self.offsets.as_mut_ptr();
for (i, &off) in self.offsets[n..].iter().enumerate() {
*dst.add(i) = off - cut_offset;
}
}
self.offsets.truncate(self.offsets.len() - n);

@mzabaluev mzabaluev Jul 17, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KonaeAkira if we're going into micro-benchmarking territory, the previous code might be better in smaller take case when the remaining vector is drained in place, because it's subtract-while-copying vs. copy, then subtract in place. But this highly depends on vectorization, and the other case benefits from a smaller alloc-and-copy. Maybe there needs to be another split helper with a map closure to address both cases.

@KonaeAkira KonaeAkira Jul 17, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing that just occurred to me: split_vec_min_alloc(&mut self.offsets, n) returns a vector with exact capacity in case n * 2 <= self.offsets.len():

pub fn split_vec_min_alloc<T>(vec: &mut Vec<T>, n: usize) -> Vec<T> {
if n * 2 <= vec.len() {
vec.drain(0..n).collect()
} else {
let remaining = vec.split_off(n);
std::mem::replace(vec, remaining)
}
}

in which case first_n_offsets.push(cut_offset); will always reallocate, which is bad.

Maybe a separate PR can address this. This affects bytes.rs as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Followed up with #23730.

@KonaeAkira KonaeAkira left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Post-merge adaptations: Float16 nested type now has `GroupColumn`
support. Use RunEndEncoded as the unsupported leaf type case.
@github-actions github-actions Bot added auto detected api change Auto detected API change and removed auto detected api change Auto detected API change labels Aug 8, 2026
MSRV doesn't let us use `if let`, but instead the whole function
can be rewritten to not use a vector to collect the single element
(which was asserted to always be the case) and DRY on the error path.
@zhuqi-lucas

Copy link
Copy Markdown
Contributor

We can create a benchmark PR target this PR first, so we can compare it in CI benchmark.

@mzabaluev

This comment was marked as resolved.

Use element ranges to look at the values.
@mzabaluev

Copy link
Copy Markdown
Contributor Author

We can create a benchmark PR target this PR first, so we can compare it in CI benchmark.

The micro-benchmark I have added in #24824 shows 19-35% improvement on minimalistic cases.
Tested on a Google Cloud C4 instance (x86_64, Intel Xeon Emerald Rapids).

rluvaton pushed a commit to mzabaluev/datafusion that referenced this pull request Sep 1, 2026
@rluvaton

rluvaton commented Sep 1, 2026

Copy link
Copy Markdown
Member

run benchmark multi_group_by

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5496098645-2059-5rtjx 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
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

Comparing nested-group-column-for-lists (559e774) to 80ae9e5 (merge-base) diff

Run configuration
run benchmark multi_group_by

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: multi_group_by

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@github-actions github-actions Bot added the auto detected api change Auto detected API change label Sep 1, 2026
@rluvaton

rluvaton commented Sep 1, 2026

Copy link
Copy Markdown
Member

run benchmark multi_group_by

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5497506950-2060-vpf5n 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
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

Comparing nested-group-column-for-lists (c701d04) to da89c7c (merge-base) diff

Run configuration
run benchmark multi_group_by

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: multi_group_by

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@github-actions github-actions Bot removed the auto detected api change Auto detected API change label Sep 1, 2026
@rluvaton

rluvaton commented Sep 1, 2026

Copy link
Copy Markdown
Member

run benchmark multi_group_by

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5498065629-2061-5sc7r 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
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

Comparing nested-group-column-for-lists (c701d04) to da89c7c (merge-base) diff

Run configuration
run benchmark multi_group_by

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: multi_group_by

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@rluvaton

rluvaton commented Sep 2, 2026

Copy link
Copy Markdown
Member

run benchmark multi_group_by

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5506298560-2079-g946q 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
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

Comparing nested-group-column-for-lists (c701d04) to da89c7c (merge-base) diff

Run configuration
run benchmark multi_group_by

Results will be posted here when complete


File an issue against this benchmark runner

@rluvaton

rluvaton commented Sep 2, 2026

Copy link
Copy Markdown
Member

@adriangb Do you have any idea why it is unable to run the benchmarks?
there is no explaination and it works localy for

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: multi_group_by

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

@rluvaton

rluvaton commented Sep 2, 2026

Copy link
Copy Markdown
Member

run benchmark multi_group_by

@adriangbot

Copy link
Copy Markdown

🤖 Benchmark running (GKE) | trigger
Instance: c4a-highmem-16 (12 vCPU / 65 GiB) | Linux bench-c5506924659-2080-cpphr 6.12.94+ #1 SMP Fri Jul 17 09:42:57 UTC 2026 aarch64 GNU/Linux

CPU Details (lscpu)
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

Comparing nested-group-column-for-lists (6f73226) to 3a4c310 (merge-base) diff

Run configuration
run benchmark multi_group_by

Results will be posted here when complete


File an issue against this benchmark runner

@adriangbot

Copy link
Copy Markdown

Benchmark for this request failed before finishing (Kubernetes reason: BackoffLimitExceeded).

Benchmarks requested: multi_group_by

Kubernetes message
Job has reached the specified backoff limit

File an issue against this benchmark runner

adriangb added a commit to adriangb/datafusion-benchmarking that referenced this pull request Sep 2, 2026
…un failed (#29)

* runner: enable a criterion target's required-features

`run_criterion_side` hardcoded `--features=parquet`, so any bench target
declaring `required-features` was unrunnable. Cargo does not skip such a
target, it refuses the whole invocation:

    error: target `multi_group_by` in package `datafusion-physical-plan`
    requires the features: `test_utils`

Both sides fail identically, which is what apache/datafusion#23648 hit.
The baseline failure was swallowed by the "new bench?" fallback and the
branch failure ended the run.

`cargo metadata` already reports `required-features` per target, on the
same call that decides criterion-vs-bench.sh routing, so carry them
through and append them to the feature list. `parquet` stays in front:
it is what every target has been run with, six targets require it by
name, and no target rejects it. The run is invoked from the workspace
root, where cargo resolves each bare feature name against the members
declaring it, so features owned by different packages list together.

Against current `apache/datafusion` this makes 14 further targets
runnable, including `aggregate_vectorized`, which the README already
lists as working:

  crypto, datetime_expressions, dictionary_encoding, encoding,
  hash_join_semi_anti, map_query_sql, math_expressions, multi_group_by,
  regex_expressions, sort_merge_join, string_expressions,
  unicode_expressions

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

* controller: quote the runner's log in a terminal failure comment

The comment a terminal Kubernetes failure posts named the reason and
nothing else, so a benchmark that failed on its own terms reached the PR
as a bare `BackoffLimitExceeded`. On apache/datafusion#23648 that was a
missing cargo feature, and the person who triggered the run had no way to
learn it: the reason describes the pod's exit, never its cause, and the
Job's TTL deletes the pod before `kubectl logs` would help even for
someone with cluster access.

The controller already holds a Kubernetes client and reconciles the
failure, so read the last 40 lines of the failed pod's log there and lead
the comment's details with them, ahead of the Kubernetes message. Newest
pod wins: `backoffLimit` is 0, so there is normally one, but a preempted
spot node can leave an earlier pod behind describing a different run.

Log output is pod output, so it gets the fence widening the Kubernetes
message already gets, and a benchmark printing a fence cannot inject
markdown into the comment. Reading it is best effort throughout: a
missing pod or an API error drops the section rather than the
notification, which is the one thing a failed run must still produce.
The controller Role gains `pods` and `pods/log`; it held only
`batch/jobs`.

Separately, the runner's own top-level handler logged `{}` on an
`anyhow::Error`, printing just the outermost context ("run multi_group_by
(branch, criterion)") and dropping the command's stderr below it. `{:#}`
walks the chain. The baseline path already used it, which is the only
reason the real message was recoverable from Cloud Logging at all.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@adriangb

adriangb commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

@adriangb Do you have any idea why it is unable to run the benchmarks? there is no explaination and it works localy for

let's see if adriangb/datafusion-benchmarking#29 fixes it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-plan Changes to the physical-plan crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants