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

Abierto
#7,394 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 2 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
62/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
scala, spark

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Scala
Estrellas
1.3k
Forks
414
Merge medio
3 d 5 h
PR fusionados (30 d)
210

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/datafusion-comet

Todos los issues de apache/datafusion-comet

Issues similares

Más issues de Scala

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.