DanielLeens opened a new pull request, #13403: URL: https://github.com/apache/seatunnel/pull/13403
### Purpose of this pull request This bug fix contributes to Apache SeaTunnel's Zeta SQL transform. It follows up on the UDF lifecycle introduced for #10460 and the first-row initialization change in #10760. On `dev`, Zeta SQL opens every SPI-discovered UDF when the first row arrives. A provider whose `open()` fails can therefore stop a plain projection such as `SELECT id FROM test` even when the query never dispatches to that provider. ### Does this PR introduce any user-facing change? Yes. The engine opens a UDF immediately before its first actual evaluation. The same dispatch covers WHERE and SELECT, and normal SPI discovery and schema inference continue to resolve UDF types. The engine closes the instances it opened and cleans them up when a later UDF fails to open. Initialization failures retain their system-error classification so that row-level error handling cannot skip them. The public UDF interface, SQL configuration, and data formats are unchanged. ### How was this patch tested? Added an engine-level regression for a plain projection with a discoverable UDF that throws from `open()`. Extended the lifecycle tests to assert that referenced UDFs stay unopened during schema inference, open once across WHERE and SELECT evaluation, close once, and preserve cleanup and the system error code when `open()` fails. The module-scoped Spotless run and `git diff --check` passed. Unit tests and runtime verification are pending GitHub CI. This draft is pending independent review. ### Check list - Updated the English and Chinese SQL UDF guides. - No new dependencies, SPI registrations, or connector changes. -- 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]
