[Bug] hll_* errors surface as Comet errors instead of HLL_INVALID_INPUT_SKETCH_BUFFER / HLL_UNION_DIFFERENT_LG_K
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ó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
Hướng nghiên cứu
Start with native/common/src/error.rs and the spark-4.x ShimSparkErrorConverter, then inspect nearby error conversion tests and HLL SQL tests. Reproduce the invalid-buffer query and the different-lgConfigK case against Spark and Comet. Done means both cases expose Spark’s specified error condition and SQLSTATE, with regression coverage.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When the native HLL expressions fail, Comet raises a plain Comet execution error instead of Spark's SparkRuntimeException with the HLL error condition. Both engines fail on the same inputs, but the error class, SQLSTATE and message differ.
| Expression | Spark error condition (SQLSTATE) |
|---|---|
hll_sketch_estimate, hll_union, hll_union_agg on an invalid buffer |
HLL_INVALID_INPUT_SKETCH_BUFFER (22546) |
hll_union, hll_union_agg with different lgConfigK and allowDifferentLgConfigK = false |
HLL_UNION_DIFFERENT_LG_K (22000) |
native/common/src/error.rs SparkError has no HLL variant, so these errors cannot reach SparkErrorConverter / ShimSparkErrorConverter.
Steps to reproduce
SELECT hll_sketch_estimate(X'0102030405');
Spark 4.x raises [HLL_INVALID_INPUT_SKETCH_BUFFER] Invalid call to hll_sketch_estimate; only valid HLL sketch buffers are supported as inputs ... with SQLSTATE 22546. Comet raises a Comet execution error with a different message.
Expected behavior
Comet raises the same error condition and SQLSTATE as Spark. A likely fix, following https://github.com/apache/datafusion-comet/issues/5072 :
- add
SparkErrorvariants for the two conditions innative/common/src/error.rs; - map them in the spark-4.x
ShimSparkErrorConvertertoQueryExecutionErrors.hllInvalidInputSketchBuffer(function)andQueryExecutionErrors.hllUnionDifferentLgK(left, right, function); - cover them with
expect_error_classSQL tests orcheckSparkError.
Additional context
Surfaced by the HLL audit for https://github.com/apache/datafusion-comet/issues/7396 . The comparison experiment confirmed both engines fail on the same inputs ( https://github.com/apache/datafusion-comet/issues/7396#issuecomment-6703600973 ). The serdes currently list this as an incompatible reason that is never returned; the audit PR moves it to a compatibility note that links here.
Willingness to contribute
I can contribute a fix for this bug independently
- Ngôn ngữ chính
- Scala
- Star
- 1.3k
- Fork
- 414
- Merge trung bình
- 3 ngày 5 giờ
- Pull request đã merge (30 ngày)
- 210
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 72/100
apache/datafusion-comet#7583 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug priority:medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
apache/datafusion-comet#7559 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area:writer bug priority:low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/datafusion-comet#7558 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/datafusion-comet#7557 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
`rand` and `randn` with an integer seed fall back to Spark without a fallback reasonCó thể đã có người làm @galaxytemple đã nhận 3 ngày trước. Đang mở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 · 1 bình luận · 1 người được giao ·
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ự
-
A-api C-bug S-ready-for-human
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
ergoplatform/ergo#2932 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
lichess-org/lila#22454 ·
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 76/100
chipsalliance/rocket-chip#3845 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 13 ngày