maomaodev opened a new pull request, #18450: URL: https://github.com/apache/iceberg/pull/18450
Closes https://github.com/apache/iceberg/issues/18449. `RewriteOperationForRowLineage.shouldUpdatePlan` matches on the target table with only a `case sparkTable: SparkTable =>` branch and no fallback. `IcebergSparkSessionExtensions` injects the rule into the Spark Analyzer, where it runs on every `UpdateTable` / `MergeIntoTable` plan regardless of which catalog owns the target, so a `DataSourceV2Relation` whose `Table` is not a `SparkTable` (Delta, Hudi, Paimon, Lance, or any custom DSV2 connector) raises `scala.MatchError` at analysis time. This adds `case _ => false` so non-Iceberg tables skip the Iceberg row-lineage rewrite and let the owning connector's own row-level rewriting take over. New test in `TestNonIcebergRowLevelOperations`: testUpdateOnNonIcebergTableDoesNotThrowMatchError: `UPDATE` on a non-Iceberg DSV2 table with `IcebergSparkSessionExtensions` enabled no longer throws, exercised against a mock `SupportsRowLevelOperations` catalog. --- **AI Disclosure** Model: DeepSeek-V4-Pro Human Oversight: reviewed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
