Skip to content

[VL][Iceberg] Automatically registered Iceberg extensions break non-Iceberg DataSource V2 operations #12912

Description

@malinjawi

Backend

VL (Velox)

Bug description

After #12823, Gluten automatically enables IcebergSparkSessionExtensions whenever Iceberg is on the classpath.

This affects every Spark session, including non-Iceberg DataSource V2 tables. With Spark 3.5 and Iceberg 1.10.0, Iceberg's row-lineage rules can throw a MatchError during UPDATE and MERGE. The Iceberg parser can also unexpectedly wrap other configured parsers.

Expected behavior: Iceberg extensions should only be enabled when explicitly configured by an Iceberg application.

Suggested fix:

  1. Stop registering the Iceberg extension globally.
  2. Configure it explicitly in Iceberg tests and applications.
  3. Add the Iceberg runtime to the gluten-ut Iceberg profile.

Community CI missed this because the Iceberg runtime was not on the gluten-ut test classpath, so the Iceberg component remained inactive.

Gluten version

main branch

Spark version

Spark-3.5.x

Spark configurations

spark.plugins=org.apache.gluten.GlutenPlugin
Iceberg runtime 1.10.0 is present on the classpath

System information

No response

Relevant logs

scala.MatchError:
org.apache.spark.sql.connector.catalog.InMemoryRowLevelOperationTable
  at org.apache.spark.sql.catalyst.analysis.RewriteOperationForRowLineage.shouldUpdatePlan
  at org.apache.spark.sql.catalyst.analysis.RewriteMergeIntoTableForRowLineage.apply

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions