[VL] RANGE window frames with interval or non-integral bounds fail the query instead of falling back
Maintainer thường phản hồi trong vòng 3 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
- 52/100
Hướng nghiên cứu
Start by reading PullOutPreProject and WindowFunctionNode.setBound, then compare the ClickHouse supportWindowExec checks with the Velox and Bolt handling described in the issue. Reproduce the date-key interval and decimal-key bound cases where the relevant backend is available. Done means these cases fall back to vanilla Spark instead of failing; the issue does not name specific test files.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Backend
Velox (the window parts also apply to Bolt and ClickHouse, see below).
Bug description
Two kinds of RANGE window frames fail the query instead of falling back to vanilla Spark.
1. A date order key with an interval bound fails planning on Velox and Bolt. PullOutPreProject pre-computes RANGE frame boundaries for date keys by turning the key into an integer (datediff from epoch) and adding the bound to it. That only works for an integer bound. With an interval bound it builds Add(int, interval), which never resolves, and planning fails:
select l_commitdate,
count(*) over (order by l_commitdate range between interval '1' month preceding and current row)
from lineitem
org.apache.spark.sql.catalyst.analysis.UnresolvedException: Invalid call to dataType on unresolved object
range between 1 preceding and current row on the same date key works.
2. A non-integral bound fails the query with NumberFormatException on ClickHouse. WindowFunctionNode.setBound reads a literal frame bound with Long.valueOf(bound.eval(null).toString()). Spark casts a RANGE bound to the order key type, so on a decimal key both 1.5 PRECEDING and 10 PRECEDING arrive as -1.50 / -10.00. The resulting NumberFormatException is not one of the exceptions validation turns into a fallback, so the query fails. ClickHouse's supportWindowExec does not check frame bounds, so a query like this reaches it:
select order_id, count(*) over (partition by category order by price
range between 10 preceding and 10 following)
from orders -- price DECIMAL(18,2)
Velox and Bolt already reject non-integral sort keys before this point. The ClickHouse path was traced by reading the code; I could not run the ClickHouse backend.
Gluten version
main (2681cc9a3)
Spark version
Spark 3.5
This issue was written with the assistance of AI (Claude Opus).
- Ngôn ngữ chính
- Scala
- Star
- 1.6k
- Fork
- 685
- Merge trung bình
- 4 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 84
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- 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/gluten
-
[CORE] Selecting a cost model the backend has no coster for fails with ClassNotFoundExceptionCó thể đã có người làm @LuciferYang đã 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 66/100
Maintainer thường phản hồi trong vòng 3 ngày
-
bug unit testing velox backend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/gluten#13463 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 3 ngày
-
[VL] madvise(WILLNEED) call fails in MmapFileStream because of wrong calculation of fetching lengthCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởbug triage
Độ 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 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của apache/gluten
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
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 72/100
rchillyard/TableParser#206 ·
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 72/100
Maintainer thường phản hồi trong vòng 2 ngày
-
? - Needs Triage bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
NVIDIA/cudf-spark#17063 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
bug 🐞 User issue 🚨
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
valkey-io/valkey-glide#7813 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày