dongjoon-hyun opened a new pull request, #54363: URL: https://github.com/apache/spark/pull/54363
### What changes were proposed in this pull request? This PR aims to add `jdbc.py` example. ### Why are the changes needed? To provide a working example which can be used in the downstream as a test case. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Manual tests. **1. Run MySQL** ```bash $ docker run -e POSTGRES_PASSWORD=rootpass -p 5432:5432 -d postgres:latest ``` **2. Run this example** ```bash $ curl -LO https://repo1.maven.org/maven2/org/postgresql/postgresql/42.7.7/postgresql-42.7.7.jar $ bin/spark-submit --driver-class-path postgresql-42.7.7.jar --jars postgresql-42.7.7.jar -c spark.log.level=ERROR examples/src/main/python/sql/jdbc.py 'jdbc:postgresql://127.0.0.1:5432/?user=postgres&password=rootpass' WARNING: Using incubator modules: jdk.incubator.vector 26/02/17 22:55:04 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Using Spark's default log4j profile: org/apache/spark/log4j2-defaults.properties 26/02/17 22:55:05 INFO SparkContext: Running Spark version 4.1.1 26/02/17 22:55:05 INFO SparkContext: OS info Mac OS X, 26.3, aarch64 26/02/17 22:55:05 INFO SparkContext: Java version 17.0.18+8-LTS Setting Spark log level to "ERROR". +---+----+ | id|name| +---+----+ | 2| bar| | 1| foo| +---+----+ ``` ### Was this patch authored or co-authored using generative AI tooling? Generated-by: `Gemini 3 Pro (High)` on `Antigravity` -- 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]
