Comet Native Executors: run a query in Spark when Comet is turned off

Đang mở Phù hợp với người mới
#7,557 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
scala, spark
Lĩnh vực
backend, testing

Hướng nghiên cứu

Đọc CometNativeExecutors.applies và các lệnh trả về sớm trong CometScanRule và CometExecRule để theo dõi cách thiết lập Spark ảnh hưởng đến việc offload kế hoạch. Thêm trường hợp được mô tả vào CometNativeExecutorsSuite: chạy một phép tổng hợp khi Comet bị tắt và kiểm tra rằng kế hoạch không có CometNativeExecutorsExec. Issue nêu rõ hành vi và bài kiểm tra mong đợi; hoàn thành nghĩa là truy vấn chạy trong Spark và kiểm tra hồi quy đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement requires-triage
What is the problem the feature request solves?

With spark.comet.nativeExecutors.enabled on (#7289), a query run with spark.comet.enabled=false is still sent to the Comet Native Executor cluster, and the driver refuses it. CometNativeExecutors.applies checks spark.comet.nativeExecutors.enabled but not spark.comet.enabled. So CometRule offloads a plan that CometScanRule and CometExecRule left unconverted, because both return early when Comet is off (isCometLoaded). The stage-graph builder then fails on the plan's top operator with "Comet Native Executors cannot run this query, because of ...: it does not run natively".

Turning Comet off for a single query is the usual way to keep that query in Spark, for example a step that generates data with a Scala UDF before the queries Comet should run, or a test's withSQLConf. With the native executors on, that query fails instead.

Describe the potential solution

Have CometNativeExecutors.applies require spark.comet.enabled as well as spark.comet.nativeExecutors.enabled, so a query with Comet off runs in Spark, as it would without the cluster. Add a test in CometNativeExecutorsSuite that runs an aggregate with Comet off and checks that its plan has no CometNativeExecutorsExec.

Additional context

Part of #7288.

Willingness to contribute

Yes. I can contribute this fix 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)
228

Chuẩn bị môi trường

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.

Issue khác của apache/datafusion-comet

Tất cả issue của apache/datafusion-comet

Issue tương tự

Thêm issue về Scala

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.