Skip to content

[VL][Iceberg] Register iceberg spark session extensions automatically - #12823

Merged
zhouyuan merged 1 commit into
apache:mainfrom
infvg:iceberg-call-parser
Aug 24, 2026
Merged

[VL][Iceberg] Register iceberg spark session extensions automatically#12823
zhouyuan merged 1 commit into
apache:mainfrom
infvg:iceberg-call-parser

Conversation

@infvg

@infvg infvg commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Gluten detects the Velox Iceberg component but does not register IcebergSparkSessionExtensions. Registered IcebergSparkSessionExtensions. Resolves #12693 (comment)

@infvg
infvg marked this pull request as ready for review August 19, 2026 12:08
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

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

Automatically registers component-provided Spark session extensions, including Iceberg’s extension for Velox, while preserving configured extensions.

Changes:

  • Added component session-extension support and merging.
  • Registered IcebergSparkSessionExtensions for Velox Iceberg.
  • Added extension deduplication and Iceberg procedure parsing tests.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
gluten-ut/test/src/test/scala/org/apache/gluten/GlutenSessionExtensionsSuite.scala Tests extension merging and deduplication.
gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala Verifies Iceberg procedures parse without manual configuration.
gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala Merges component extensions into Spark configuration.
gluten-core/src/main/scala/org/apache/gluten/component/Component.scala Adds the component extension API.
backends-velox/src-iceberg/main/scala/org/apache/gluten/component/VeloxIcebergComponent.scala Supplies the Iceberg Spark session extension.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@zhouyuan
zhouyuan merged commit 0364eaf into apache:main Aug 24, 2026
61 checks passed
@malinjawi

Copy link
Copy Markdown
Contributor

Hi @infvg, we found an issue after this change when the Iceberg runtime is on the classpath. Tracking issue: #12912.

IcebergSparkSessionExtensions is now enabled for every Gluten session. Iceberg’s row-lineage rules then process non-Iceberg DataSource V2 tables, causing UPDATE and MERGE operations to fail with:

scala.MatchError: org.apache.spark.sql.connector.catalog.InMemoryRowLevelOperationTable

The extension can also unexpectedly wrap other configured SQL parsers.

Community CI passed because the Iceberg runtime was not on the gluten-ut test classpath, so the Iceberg component remained inactive during those tests.

The safest fix seems to be keeping the new component extension mechanism, but not registering the Iceberg extension globally. Iceberg applications and tests can configure it explicitly, and we can add the runtime to gluten-ut so mixed-format sessions are covered.

Does this approach make sense to you?

@jackylee-ch

Copy link
Copy Markdown
Contributor

Sorry for the late review. For cloud products or internal platforms that provide standardized components, the Iceberg extension is often not enabled by default, even when Iceberg itself is available.
In that case, making this configurable and loading it only when needed may better fit real-world usage. @infvg Could we consider reverting the current change and leave this decision to users, especially since this functionality depends on a third-party component?

@infvg

infvg commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

@jackylee-ch yep that's a good point, let's revert it #12913

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.

[VL] Call Iceberg Function from pyspark failed

5 participants