test: no test on main reaches the folded UnsafeArrayData literal fix from #6666
Maintainer thường phản hồi trong vòng 2 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Bắt đầu với spark/src/test/resources/sql-tests/operators/one_row_relation.sql, file này thiếu chỉ thị -- ConstantFolding: enabled, và với CometSqlFileTestSuite, suite này bỏ qua constant folding trừ khi một file yêu cầu. Hoặc thêm chỉ thị vào các truy vấn đó, hoặc chuyển chúng sang expressions/array/folded_array_map_literals.sql, và đảm bảo các literal chạy dưới một toán tử Comet, ví dụ bằng cách chiếu (project) trên một bảng. Hoàn thành khi việc hoàn tác các lệnh gọi toArray[Any] trong spark/src/main/scala/org/apache/comet/serde/literals.scala khiến suite thất bại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Scala
- Star
- 1.3k
- Fork
- 405
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 239
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/datafusion-comet
-
requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/datafusion-comet#7479 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:writer enhancement requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
apache/datafusion-comet#7463 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
apache/datafusion-comet#7453 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:ci enhancement priority:low requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
apache/datafusion-comet#7319 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:ci bug priority:low requires-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/datafusion-comet#7315 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của apache/datafusion-comet
Issue tương tự
-
Spark benchmarks crash with `[INVALID_DRIVER_MEMORY]` on JVMs whose default heap is below Spark's ~450 MB minimumCó thể đã có người làm @sendaoYan đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
-
SEO
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
lichess-org/lila#22409 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
canton-network/splice#8342 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug genc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`estimateTip` caps the estimated tip at 2147483647Có thể đã có người làm @RaphaelFakhri đã nhận 1 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
software-mansion/starknet-jvm#644 ·
Maintainer thường phản hồi trong vòng 2 ngày