jk-shah opened a new pull request, #41436:
URL: https://github.com/apache/beam/pull/41436

   Adds `beam sql` to the experimental `beam` command introduced in #40968 and 
#41040.
   
   `beam sql` launches the Apache Beam SQL shell (`BeamSqlLine`) with the same 
flags, shaded uber-JAR build (including `delta` and `iceberg` connector parity 
from #40958 / #41090), and `~/.beam/cache/` + `~/.beam/maven-wrapper/` layout 
as `scripts/beam-sql.sh`, so cached JARs are shared between both entry points 
without rebuilding:
   
   ```bash
   beam sql
   beam sql --io csv --io parquet
   beam sql -e "SELECT 1 + 1 AS two;"
   beam sql --runner dataflow --io google-cloud-platform
   beam sql --list-versions
   beam sql --list-ios
   beam sql --list-runners
   ```
   
   ### Key details
   - **Cross-platform & prerequisite checks:** Verifies a working Java 11+ 
runtime (`JAVA_HOME` or `PATH`, including `java.exe` on Windows and catching 
macOS's `/usr/bin/java` stub and Java 8 with exit code `4`), invokes 
`MavenWrapperMain` directly via `java` rather than `sh`/`mvnw`, and queries 
Maven Central via Python `urllib` (no `curl`, `sed`, or GNU `sort -V` required).
   - **Cache & network safety:** Uses cross-process file locks 
(`.maven-wrapper.lock`, `<jar>.lock` with `O_NOFOLLOW`), `zipfile.is_zipfile` 
validation (rebuilding truncated/corrupt cached JARs automatically), atomic 
`tempfile.mkstemp` + `os.replace` writes, HTTPS-only redirect enforcement, and 
`SNAPSHOT`-only snapshot repository gating.
   
   


-- 
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]

Reply via email to