Skip to content

[VL][UT] Add the iceberg jar when the iceberg profile is selected - #12914

Open
infvg wants to merge 2 commits into
apache:mainfrom
infvg:icebergutadd
Open

[VL][UT] Add the iceberg jar when the iceberg profile is selected#12914
infvg wants to merge 2 commits into
apache:mainfrom
infvg:icebergutadd

Conversation

@infvg

@infvg infvg commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

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.

@github-actions github-actions Bot added the CORE works for Gluten Core label Aug 27, 2026
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

1 similar comment
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

@zhouyuan
zhouyuan requested a lite review from Copilot August 27, 2026 16:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 iceberg Maven profile in gluten-ut that pulls in iceberg-spark-runtime with test scope.
  • Stops wiring Spark SQL extensions via Component/driver-plugin aggregation; Iceberg-specific tests set spark.sql.extensions explicitly.
  • 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.

Comment on lines +53 to +59
// 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)
}
Comment on lines 79 to 84
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 = {}
Comment on lines +53 to +59
// 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)
}
Comment on lines +40 to +42
.set(
"spark.sql.extensions",
"org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
Comment on lines +31 to +32
SparkReflectionUtil.isClassPresent(
"org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
Comment thread gluten-ut/pom.xml
Comment on lines +205 to +207
<activation>
<activeByDefault>false</activeByDefault>
</activation>
@infvg
infvg marked this pull request as ready for review August 27, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE works for Gluten Core DATA_LAKE VELOX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants