akupchinskiy commented on PR #27047:
URL: https://github.com/apache/datafusion/pull/27047#issuecomment-7039274101
Thanks for the review! I rebased onto main and added the reproducer as a new
SQL suite, `first_last_tz`, as the first commit (a07bd3e43), so it gives a
benchmark-only baseline.
Since #27303, the original single-key `ORDER BY ts` already takes the new
primitive-key accumulator, so the suite orders by `ts, o` and uses `DISTINCT
ON`, which still go through `FirstLastGroupsAccumulator`, with matching
controls over a naive timestamp. Locally at 10 partitions Q01/Q03 go from
956/942 ms to 49/68 ms; the controls are 54/66 ms vs 50/67 ms. At 1 partition
there is no material change.
Both suggestions are applied: an empty merge state now returns the `Empty
row in FIRST_VALUE` error instead of panicking (confirmed it panicked before),
and the test asserts the emitted timestamp ticks in both state chunks for
FIRST_VALUE and LAST_VALUE.
The suite isn't in `bench.sh` on main yet, so it should run through the
Criterion `sql` target:
````text
run benchmark sql
```yaml
env:
BENCH_NAME: "first_last_tz"
BENCH_FILTER: "first_last_tz"
baseline:
ref: "a07bd3e430588842f4c602f6b9a80b2a9509ee0c"
```
````
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]