Skip to content

Revert "[VL][Iceberg] Register iceberg spark session extensions automatically" - #12913

Open
zhouyuan wants to merge 1 commit into
mainfrom
revert-12823-iceberg-call-parser
Open

Revert "[VL][Iceberg] Register iceberg spark session extensions automatically"#12913
zhouyuan wants to merge 1 commit into
mainfrom
revert-12823-iceberg-call-parser

Conversation

@zhouyuan

Copy link
Copy Markdown
Member

Reverts #12823

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.

Reverts automatic registration of Iceberg Spark session extensions by the Gluten plugin/components, shifting responsibility back to explicit Spark config in Iceberg tests and simplifying extension handling in the driver plugin.

Changes:

  • Removes component-provided Spark SQL session extensions support (sparkSessionExtensions) from Component and Velox Iceberg component.
  • Updates driver plugin to only ensure Gluten’s own session extension is present, without merging component extensions.
  • Adjusts Iceberg test configuration to explicitly set Iceberg Spark SQL extensions and drops a test that asserted plugin-based registration.

Reviewed changes

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

Show a summary per file
File Description
gluten-ut/test/src/test/scala/org/apache/gluten/GlutenSessionExtensionsSuite.scala Deletes a suite that validated “append once” behavior for configured + component + Gluten session extensions.
gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala Explicitly configures Iceberg Spark SQL extensions; removes a test that depended on plugin-driven registration.
gluten-core/src/main/scala/org/apache/gluten/component/Component.scala Removes the sparkSessionExtensions() hook from the component API.
gluten-core/src/main/scala/org/apache/gluten/GlutenPlugin.scala Simplifies session-extension configuration to only add Gluten’s extension if missing; removes component-merge helper.
backends-velox/src-iceberg/main/scala/org/apache/gluten/component/VeloxIcebergComponent.scala Removes Iceberg session-extension registration via component; leaves runtime compatibility check.

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

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 +54 to +59
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 45
.set(
"spark.sql.extensions",
"org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions")
.set("spark.sql.catalog.spark_catalog", "org.apache.iceberg.spark.SparkCatalog")
.set("spark.sql.catalog.spark_catalog.type", "hadoop")
.set("spark.sql.catalog.spark_catalog.warehouse", s"file://$rootPath/tpch-data-iceberg-velox")
.set("spark.sql.catalog.spark_catalog.type", "hadoop")
.set("spark.sql.catalog.spark_catalog.warehouse", s"file://$rootPath/tpch-data-iceberg-velox")
}

Comment on lines +54 to +59
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)
}
@github-actions

Copy link
Copy Markdown

Run Gluten Clickhouse CI on x86

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.

4 participants