Skip to content

[KYUUBI #5860][SPARK] Return SQL keywords through GetInfo - #7784

Closed
wayne-x-wang wants to merge 1 commit into
apache:masterfrom
wayne-x-wang:kyuubi-5860-spark-sql-keywords
Closed

wayne-x-wang wants to merge 1 commit into
apache:masterfrom
wayne-x-wang:kyuubi-5860-spark-sql-keywords

Conversation

@wayne-x-wang

Copy link
Copy Markdown
Contributor

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:

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:

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)

@github-actions

Copy link
Copy Markdown

Hello @wayne-x-wang,
Thanks for finding the time to submit the Pull request, the Kyuubi community thanks you!
We really appreciate the community's efforts to improve Apache Kyuubi.
If you are new to Apache Kyuubi for code changes, please take some time to read our contributing guide.

@wayne-x-wang
wayne-x-wang force-pushed the kyuubi-5860-spark-sql-keywords branch from fc02d58 to 628bc07 Compare October 14, 2026 06:32
@pan3793 pan3793 added this to the v1.13.0 milestone Oct 14, 2026
@pan3793 pan3793 closed this in 88739a9 Oct 14, 2026
@pan3793

pan3793 commented Oct 14, 2026

Copy link
Copy Markdown
Member

Merge Summary:

Posted by merge_kyuubi_pr.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TASK][EASY] Support get SQL keywords from Spark engine through API

2 participants