Delta contrib: a split classloader is reported as a Comet version mismatch

Đang mở
#7,394 1 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ó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
62/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

Hướng nghiên cứu

Start in spark/src/main/scala/org/apache/comet/rules/CometScanContrib.scala, in firstClaimFrom, where every LinkageError gets the same version-skew warning. Check ContribServices for the similar provider-loading message. Done means NoClassDefFoundError and ClassNotFoundException produce a message naming the missing class and suggesting --packages or --jars, while other linkage errors keep the existing wording. Also update docs/source/user-guide/latest/delta.md to require all jars on the same classloader.

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

Mô tả

area:Delta area:scan bug priority:low
Describe the bug

When delta-spark is loaded with --packages while Comet and the Delta contrib jar are on extraClassPath, Delta ends up in a child classloader that Comet's classes can't see. The contrib's scan hook then throws NoClassDefFoundError: org/apache/spark/sql/delta/DeltaParquetFileFormat. CometScanContrib.firstClaimFrom catches every LinkageError the same way and logs:

Contrib scan handler ... failed with java.lang.NoClassDefFoundError, indicating it was built
against a different version of Comet's internals than is on the classpath now; declining it
and continuing with Comet's built-in handling

The query then runs on Spark's reader. The jars all match, so the message names the wrong cause, and since the fallback is silent, that log line is the only hint the user gets.

Found in #5882 (comment).

Steps to reproduce
  1. Spark 4.1.3, Comet 1.2.0 (comet-spark-spark4.1_2.13) and comet-contrib-delta-spark on spark.driver.extraClassPath and spark.executor.extraClassPath.
  2. Add delta-spark 4.3.1 with --packages io.delta:delta-spark_2.13:4.3.1, plus the usual Delta session extension and catalog settings and spark.comet.scan.delta.enabled=true.
  3. Read any Delta table. The plan has no CometDeltaNativeScan, and the driver log shows the warning above.

With all jars on extraClassPath the same read plans CometDeltaNativeScan.

Expected behavior
  • For NoClassDefFoundError or ClassNotFoundException, the warning names the missing class and says it isn't visible from the classloader that loaded Comet, mentioning --packages or --jars as the likely cause. The version-skew wording stays for NoSuchMethodError, AbstractMethodError and the other linkage errors, where it fits.
  • The Delta user guide (docs/source/user-guide/latest/delta.md) states that Comet, the contrib jar and delta-spark have to be on the same classloader, for example all on spark.{driver,executor}.extraClassPath. It currently only says the contrib jar goes "on the classpath, alongside delta-spark".
Additional context

The catch is in spark/src/main/scala/org/apache/comet/rules/CometScanContrib.scala (firstClaimFrom). ContribServices has similar "built against a different Comet or Spark version" wording for provider loading failures, which may deserve the same split.

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

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.