wayne-x-wang opened a new pull request, #7791:
URL: https://github.com/apache/kyuubi/pull/7791
### Why are the changes needed?
Inserts into JDBC temporary views resolve to `InsertIntoDataSourceCommand`
with no target `catalogTable`. The guarded `map` throws a `MatchError`, so
lineage extraction fails even though the write succeeds.
Preserve query column names and source lineage when target catalog metadata
is absent, matching the existing `SaveIntoDataSourceCommand` behavior.
`outputTables` remains empty; this change does not infer a JDBC destination
identity. Catalog-backed inserts keep their existing behavior.
Fixes #6314.
### How was this patch tested?
Added an embedded Derby regression that creates a JDBC temporary view
through SQL, executes an insert, reads the stored row through JDBC, and checks
the command type, absent `catalogTable`, source tables, column mappings, and
empty output tables. It checks both `parse` and `transformToLineage`. Without
the fix, two separate JVM runs failed with the same `MatchError`. Existing
tests cover inserts with target catalog metadata.
Spark 3.5.8 / Scala 2.12: all 77 lineage tests passed.
```bash
build/mvn -B -ntp test \
-pl extensions/spark/kyuubi-spark-lineage -am \
-Pspark-3.5,spark-provided,flink-provided,hive-provided \
-Dtest=none -DwildcardSuites=org.apache.kyuubi.plugin.lineage
```
Spark 4.2.0 / Scala 2.13: the JDBC temporary-view regression passed.
```bash
build/mvn -B -ntp test \
-pl extensions/spark/kyuubi-spark-lineage -am \
-Pspark-4.2,scala-2.13,spark-provided,flink-provided,hive-provided \
-Dtest=none \
'-Dtests=@columns lineage extract - insert into a JDBC temporary view
without catalog metadata' \
-Dsuffixes=TableCatalogLineageParserSuite
```
`dev/reformat`, Spotless, Scalastyle, and `git diff --check` passed. The
historical Kyuubi 1.8.0 / Spark 3.2.3 combination and MySQL were not tested.
### Was this patch assisted by generative AI tooling?
Assisted-by: Codex (GPT-6)
--
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]