Revert "[VL][Iceberg] Register iceberg spark session extensions automatically" - #12913
Revert "[VL][Iceberg] Register iceberg spark session extensions automatically"#12913zhouyuan wants to merge 1 commit into
Conversation
…atically…" This reverts commit 0364eaf.
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.
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) fromComponentand 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.
| 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 = {} |
| 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") | ||
| .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") | ||
| } | ||
|
|
| 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) | ||
| } |
|
Run Gluten Clickhouse CI on x86 |
Reverts #12823