apache / apache/datafusion

Attach `Diagnostic` to "wrong number of arguments" error

Đang mở
#14,432 15 bình luận 0 reaction 1 người được giao Xem trên GitHub

@Chen-Yuan-Lai đang làm issue này rồi.

Từ ngày 4/2/2025.

enhancement good first issue
Ngôn ngữ chính
Rust
Star
9.3k
Fork
2.4k
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
363

Mô tả

Is your feature request related to a problem or challenge?

For a query like:

SELECT sum(1, 2)

The only message that the end user of an application built atop of DataFusion sees is:

Error during planning: Execution error: User-defined coercion failed with Execution("SUM expects exactly one argument") No function matches the given name and argument types 'sum(Int64, Int64)'. You might need to add explicit type casts.
        Candidate functions:
        sum(UserDefined)

We want to provide a richer message that references and highlights locations in the original SQL query, and contextualises and helps the user understand the error. In the end, it would be possible to display errors in a fashion akin to what was enabled by #13664 for some errors:

See #14429 for more information.

Describe the solution you'd like

Attach a well crafted Diagnostic to the DataFusionError, building on top of the foundations laid in #13664. See #14429 for more information.

Describe alternatives you've considered

No response

Additional context

No response

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.