wayne-x-wang opened a new pull request, #7784:
URL: https://github.com/apache/kyuubi/pull/7784
### Why are the changes needed?
Closes #5860.
The Spark SQL engine returns `Unimplemented` for `CLI_ODBC_KEYWORDS`,
preventing clients from retrieving Spark SQL keywords through Thrift `GetInfo`
or JDBC `DatabaseMetaData.getSQLKeywords()`.
Access Spark's `SQLKeywordUtils` through a helper in the Spark SQL package
and return its comma-separated keyword list, matching Spark's Thrift server
behavior.
### How was this patch tested?
Added two regression tests in `SessionSuite`, covering Thrift `GetInfo` and
JDBC metadata. The JDBC fixture requests protocol V11, as required by
`getSQLKeywords()`. Both new tests failed with `Unimplemented` before the
implementation on Spark 3.5.8.
All three tests in `SessionSuite` passed on Java 17 with the following
profiles:
| Spark | Scala | Maven profile | Result |
| --- | --- | --- | --- |
| 3.5.8 | 2.12.19 | `spark-3.5` | 3 passed, 0 failed |
| 4.0.3 | 2.13.17 | `spark-4.0,scala-2.13` | 3 passed, 0 failed |
| 4.1.2 | 2.13.17 | `spark-4.1,scala-2.13` | 3 passed, 0 failed |
| 4.2.0 | 2.13.17 | `spark-4.2,scala-2.13` | 3 passed, 0 failed |
Reproduction commands:
```bash
build/mvn -B -ntp test \
-pl externals/kyuubi-spark-sql-engine -am \
-Pspark-3.5,spark-provided,flink-provided,hive-provided \
-Dtest=none \
-DwildcardSuites=org.apache.kyuubi.engine.spark.session.SessionSuite
for profile in spark-4.0 spark-4.1 spark-4.2; do
build/mvn -B -ntp clean test \
-pl externals/kyuubi-spark-sql-engine -am \
-P"${profile},scala-2.13,spark-provided,flink-provided,hive-provided" \
-Dtest=none \
-DwildcardSuites=org.apache.kyuubi.engine.spark.session.SessionSuite
done
```
Also ran `dev/reformat`, followed by Spotless and Scalastyle checks (0
errors, 0 warnings in the Spark SQL engine), and `git diff --check`:
```bash
build/mvn -B -ntp test-compile spotless:check scalastyle:check \
-pl externals/kyuubi-spark-sql-engine -am \
-Pspark-4.2,scala-2.13,spark-provided,flink-provided,hive-provided
```
### Was this patch assisted by generative AI tooling?
Assisted-by: OpenAI Codex (GPT-6)
--
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]