[VL][UT] Add the iceberg jar when the iceberg profile is selected - #12914
[VL][UT] Add the iceberg jar when the iceberg profile is selected#12914infvg wants to merge 2 commits into
Conversation
…atically…" This reverts commit 0364eaf.
|
Run Gluten Clickhouse CI on x86 |
1 similar comment
|
Run Gluten Clickhouse CI on x86 |
|
Run Gluten Clickhouse CI on x86 |
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Aligns UT execution with CI’s iceberg profile by ensuring Iceberg is present on the test classpath and by adjusting how Spark SQL extensions are configured/validated under Iceberg-enabled runs.
Changes:
- Adds an
icebergMaven profile ingluten-utthat pulls iniceberg-spark-runtimewithtestscope. - Stops wiring Spark SQL extensions via
Component/driver-plugin aggregation; Iceberg-specific tests setspark.sql.extensionsexplicitly. - Removes UT coverage around “component session extensions are appended once”.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| gluten-ut/test/src/test/scala/org/apache/gluten/GlutenSessionExtensionsSuite.scala | Removes a UT that validated session-extension merging/dedup behavior. |
| gluten-ut/pom.xml | Adds iceberg profile to include Iceberg runtime on the UT test classpath. |
| gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala | Explicitly enables Iceberg Spark SQL extensions in test SparkConf; drops a procedure-registration test. |
| gluten-core/src/main/scala/org/apache/gluten/component/Component.scala | Removes sparkSessionExtensions() from the component API. |
| gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala | Changes driver init to only ensure Gluten’s extension is present (no component-driven extensions). |
| backends-velox/src-iceberg/main/scala/org/apache/gluten/component/VeloxIcebergComponent.scala | Removes component-provided session extension; keeps runtime-compat check via class presence. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Spark SQL extensions | ||
| val extensionSeq = conf.get(SPARK_SESSION_EXTENSIONS).getOrElse(Seq.empty) | ||
| if (!extensionSeq.toSet.contains(GlutenSessionExtensions.GLUTEN_SESSION_EXTENSION_NAME)) { | ||
| conf.set( | ||
| SPARK_SESSION_EXTENSIONS, | ||
| extensionSeq :+ GlutenSessionExtensions.GLUTEN_SESSION_EXTENSION_NAME) | ||
| } |
| def info(): Map[String, String] = Map.empty | ||
| def dependencies(): Seq[Class[_ <: Component]] | ||
|
|
||
| def sparkSessionExtensions(): Seq[String] = Nil | ||
|
|
||
| /** Spark listeners. */ | ||
| def onDriverStart(sc: SparkContext, pc: PluginContext): Unit = {} | ||
| def onDriverShutdown(): Unit = {} |
| // Spark SQL extensions | ||
| val extensionSeq = conf.get(SPARK_SESSION_EXTENSIONS).getOrElse(Seq.empty) | ||
| if (!extensionSeq.toSet.contains(GlutenSessionExtensions.GLUTEN_SESSION_EXTENSION_NAME)) { | ||
| conf.set( | ||
| SPARK_SESSION_EXTENSIONS, | ||
| extensionSeq :+ GlutenSessionExtensions.GLUTEN_SESSION_EXTENSION_NAME) | ||
| } |
| .set( | ||
| "spark.sql.extensions", | ||
| "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions") |
| SparkReflectionUtil.isClassPresent( | ||
| "org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions") |
| <activation> | ||
| <activeByDefault>false</activeByDefault> | ||
| </activation> |
The Iceberg runtime is declared as provided and is therefore absent from gluten-ut’s test classpath. This leaves the Iceberg component inactive even when CI enables the Iceberg profile.
This PR adds the runtime as a test-scoped dependency so CI exercises sessions where Iceberg is present and can detect iceberg+unrelated component regressions such as #12912. This also makes it simulate a more realistic production environment where iceberg is present but not being used.