ahmedabu98 opened a new pull request, #41530: URL: https://github.com/apache/beam/pull/41530
Follow-up to #41315. #41315 added `LiveResult`, which imports `DirectOptions` to set `blockOnRun` to false. `BeamEnumerableConverter` already imported `DirectOptions` and `DirectRunner`, for the same reason and to check that a query runs on the DirectRunner. A build of the SQL core module without the DirectRunner can't compile either class. Google's internal build is one: it patches these imports out of `BeamEnumerableConverter`, and it can't take #41315 or the PRs built on it until `LiveResult` stops importing `DirectOptions`. This PR removes every reference to `org.apache.beam.runners.direct` from `sdks/java/extensions/sql/src/main` without changing behavior: - `blockOnRun` is set through a small `BlockOnRunOptions` interface in `BeamEnumerableConverter`. Pipeline options with the same name share one value, so this sets the same option that the DirectRunner reads through `DirectOptions`. `TestPipelineOptions` declares the option the same way. - The DirectRunner checks compare the runner's simple name, `DirectRunner`, instead of its full class name. `--runner=DirectRunner` finds the runner by that name too. The module still depends on the DirectRunner, so queries still run on it by default. The code no longer uses it, so `build.gradle` adds `permitUnusedDeclared` for it, or the dependency analysis fails. `:sdks:java:extensions:sql:preCommit`, `:sdks:java:extensions:sql:jdbc:preCommit` and the jdbc and iceberg SQL tests pass locally. -- 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]
