OxQL: surprising "input tables to group_by must be aligned" error when no data
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with the group_by validation in oximeter/db/src/oxql/ast/table_ops/group_by.rs and the is_aligned logic in oximeter/oxql-types/src/table.rs. Reproduce the query with a time range containing no data, including ranges before and after the instance lifetime, then trace how the empty result reaches group_by. Done should be defined by the issue's no-data reproduction no longer producing a misleading alignment error.
Written by the indexing model from the issue text.
Description
I ran a query like this:
get virtual_machine:vcpu_usage | filter timestamp >= @2025-03-03T20:50:11.000 && timestamp < @2025-03-03T21:00:31.000 && instance_id == "cd434a6f-815f-446d-9e32-744c991b25ed" && state == "run" | align mean_within(10s) | group_by [vcpu_id], sum
And got errors like the below despite the manifest presence of align mean_within(10s) in the query. These are dogfood request IDs.
{
"request_id": "38890de5-8cf3-49ab-bdf5-710956f0bb38",
"error_code": "InvalidRequest",
"message": "Input tables to a `group_by` must be aligned"
}
{
"request_id": "5252c89f-07a6-44ba-b77f-373e6218fbce",
"error_code": "InvalidRequest",
"message": "Input tables to a `group_by` must be aligned"
}
I see that the error comes from here. I will do more investigation and really nail down exactly what query I ran to get it, but I don't think it's an issue with query construction. You can see that the console code to generate queries is written so that there is always an align mean_within(<interval>) present.
This was an instance that had recently started, so I wonder if the problem was that there were no timeseries in the table, which does get you an is_aligned value of false.
Update: yep, I can systematically reproduce the error by changing the time range so that it doesn't contain any data points. This works for a time range both before and after the lifetime of the instance.
https://github.com/user-attachments/assets/7690cc30-8cd5-420e-a45b-3cb49afd4e01
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from oxidecomputer/omicron
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
oxidecomputer/omicron#11269 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
oxidecomputer/omicron#11266 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
oxidecomputer/omicron#11260 · 1 comment ·
-
wicket's errors should be better when trying to read sensitive data from ssh without a pseudo-tty Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxidecomputer/omicron#11148 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oxidecomputer/omicron#10907 ·
All issues in oxidecomputer/omicron
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100