Plain `none` from a grouping expression appears in `aggregate` output
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with the repro: run the aggregate query with count() by t:=a.ok() on the four-record input and compare with the values {t:a.ok()} form, which already drops the plain none field. The aggregate grouping-key handling is the place to look, and the type checker's none not handled error is the reference for how a possibly-none value is treated. Done means the grouping key of none no longer appears as a t:none row, or the query errors clearly, with a test covering the four-record input.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
When an aggregate grouping expression evaluates to a plain none (e.g., via ok()), the none is kept as the key value in the output. Per the approach described in #7584, a plain none that lands in a record field should disappear, and a query shouldn't output one. When asked about this, @mccanne said the none grouping expressions should disappear, or maybe be an error.
Details
Repro is with super commit 40ff9fb. This was spotted with the JSONBench bluesky data in the verification notes in https://github.com/superdb/super/issues/7479#issuecomment-6455141392, but it can be reproduced with a simple four-record input.
$ super -version &&
super -c '
values {a:"x"},{a:"y"},{b:1},{a:"x"}
| aggregate count() by t:=a.ok()
| sort t'
Version: v0.4.0-17-g40ff9fbf5
{t:"x",count:2}
{t:"y",count:1}
{t:none,count:1}
Compare this with a record expression on the same input, where the plain none field disappears:
$ super -c '
values {a:"x"},{a:"y"},{b:1},{a:"x"}
| values {t:a.ok()}'
{t:"x"}
{t:"y"}
{}
{t:"x"}
Downstream, the type checker already treats t as possibly none. Adding | values t to the first query fails with none not handled (consider ?? or ?.), yet the record holding that none is output without complaint.
More detail from Claude is available in a Gist.
- Lingua principale
- Go
- Stelle
- 1.6k
- Fork
- 84
- Merge medio
- 10h 14m
- PR unite (30g)
- 150
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di superdb/super
-
zeek reader: time/interval values with more than 9 fractional digits silently become 0; out-of-range values wrapForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertacommunity
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
superdb/super#7492 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
panic: "slice bounds out of range" in query containing `unnest`Forse già presa @philrz l’ha presa oggi. Apertabug
superdb/super#7608 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Panic comparing `uint64` values >= 2^63 to integersForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
superdb/super#7588 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
I maintainer di solito rispondono entro 1 giorno
-
v0.4.0: panic on a record literal with an untyped optional none fieldForse già presa @RyoKusnadi l’ha presa 2 giorni fa. Aperta
Difficoltà 3/5 Mezza giornata Idoneità per principianti 58/100
superdb/super#7582 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di superdb/super
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
txn2/mcp-data-platform#2493 ·
I maintainer di solito rispondono entro 1 giorno
-
area/docs framework/hugo help wanted language/markdown
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
openclaw/crabbox#3060 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
radius-project/radius#13698 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno