test: no test on main reaches the folded UnsafeArrayData literal fix from #6666
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
Direzione di ricerca
Inizia da spark/src/test/resources/sql-tests/operators/one_row_relation.sql, che non ha la direttiva -- ConstantFolding: enabled, e da CometSqlFileTestSuite, che salta il constant folding a meno che un file non lo richieda. Aggiungi la direttiva a quelle query oppure spostale in expressions/array/folded_array_map_literals.sql, e assicurati che i literal vengano eseguiti sotto un operatore Comet, per esempio proiettando su una tabella. È completato quando annullare le chiamate toArray[Any] in spark/src/main/scala/org/apache/comet/serde/literals.scala fa fallire la suite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
#6666 changed CometLiteral to read array literal values with toArray[Any](elementType) instead of ArrayData.array. A constant-folded array such as sequence(1, 5) is an UnsafeArrayData, and UnsafeArrayData.array() throws. Before the change, planning such a query failed with UNSUPPORTED_CALL.
The test added for that change is the first three queries in spark/src/test/resources/sql-tests/operators/one_row_relation.sql. That file has no -- ConstantFolding: enabled line, and CometSqlFileTestSuite excludes ConstantFolding unless the file asks for it (the directive came in #6731, two days after #6666). So SELECT sequence(1, 5) there never folds. It runs through the native CometSequence, and the CometLiteral lines from #6666 are never reached. I couldn't find another test on main that folds an array into an UnsafeArrayData literal under a Comet operator, so putting .array back should go unnoticed.
Found in #7449, the branch-1.1 backport of the fix, which adds a Scala test that does fold: https://github.com/apache/datafusion-comet/pull/7449#pullrequestreview-5754272211
Steps to reproduce
- On
main, change the twotoArray[Any](...)calls inspark/src/main/scala/org/apache/comet/serde/literals.scalaback to.array. - Run
CometSqlFileTestSuiteforone_row_relation. With folding excluded,sequence(1, 5)stays aSequenceexpression, so the reverted lines are never called and the file should still pass.
Expected behavior
A test on main fails when the fix is reverted. Either of these would do it:
- Add
-- ConstantFolding: enabledto the queries inone_row_relation.sql, or move them into a fixture that has it, such asexpressions/array/folded_array_map_literals.sql. - Port the test from #7449, which projects
sequence(1, 5)andarray(sequence(1, 3), sequence(4, 5))over a Parquet table. The nested query covers the innermakeListLiteralcall as well.
Additional context
The queries need to read from a table, or run over a OneRowRelation with folding on, so that the folded literal sits under an operator Comet converts.
- Lingua principale
- Scala
- Stelle
- 1.3k
- Fork
- 405
- Merge medio
- 3g 3h
- PR unite (30g)
- 269
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un 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 apache/datafusion-comet
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#7479 ·
I maintainer di solito rispondono entro 2 giorni
-
area:writer enhancement requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
apache/datafusion-comet#7463 ·
I maintainer di solito rispondono entro 2 giorni
-
requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
apache/datafusion-comet#7453 ·
I maintainer di solito rispondono entro 2 giorni
-
area:ci enhancement priority:low requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
apache/datafusion-comet#7319 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
area:ci bug priority:low requires-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
apache/datafusion-comet#7315 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di apache/datafusion-comet
Issue simili
-
enhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
I maintainer di solito rispondono entro 1 giorno
-
bug minor
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
propensive/soundness#2418 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
scylladb/scylla-migrator#432 ·
I maintainer di solito rispondono entro 1 giorno
-
30-minutes algorithm any-language codewars dart easy elixir hackerrank hacktoberfest haskell help wanted interview-prep julia leetcode lua open-source r scala students zig
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Huerte/algo-solutions-python#163 ·
I maintainer di solito rispondono entro 1 giorno
-
Python: zadd stringifies bytes/bytearray/memoryview members (silent data corruption), including in BatchForse già presa @prateek-kumar-improving l’ha presa 1 giorno fa. Apertabug 🐞 python 🐍
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
valkey-io/valkey-glide#7521 ·
I maintainer di solito rispondono entro 1 giorno