MartijnVisser opened a new pull request, #245: URL: https://github.com/apache/flink-connector-jdbc/pull/245
## What is the purpose of the change - The JDBC Table sink reports an empty lineage dataset name. `TableLineageUtils` asks the object the sink provider returns for lineage at plan time, and `JdbcOutputFormat.getLineageVertex()` read the statement off the executor that only exists after `open()`. ## Brief change log - `JdbcOutputFormatBuilder` hands the dialect's INSERT statement to `JdbcOutputFormat` as the lineage query, on the upsert and the append branch - `JdbcOutputFormat.getLineageVertex()` uses that query and keeps the executor's statement as the fallback for the three-argument constructor ## Verifying this change This change added tests and can be verified as follows: - `JdbcOutputFormatTest#testGetLineageVertex` asserts before and after `open()`, and `JdbcDynamicTableSinkITCase#testLineageDatasetNameIsKnownAtPlanTime` goes through the provider the way the planner does, for a keyed and a keyless table. Both fail on 99b1666 with `""` and pass with this change. - `JdbcDialectTest#testInsertStatementNamesTheLineageTable` checks per dialect that the INSERT parses to the table name, quoting included. - Green on Derby, MySQL and Postgres. ## Does this pull request potentially affect one of the following parts: - Dependencies (does it add or upgrade a dependency): no - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: no - The serializers: no - The runtime per-record code paths (performance sensitive): no - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no - The S3 file system connector: no ## Documentation - Does this pull request introduce a new feature? no - If yes, how is the feature documented? not applicable Release note: the lineage dataset name reported by the JDBC Table sink is now the physical table name instead of an empty string. OpenLineage consumers will see a new dataset node rather than a renamed one. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) Generated-by: Claude Code (Fable 5.1) -- 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]
