This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch branch-1.8
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/branch-1.8 by this push:
new b5204d23a [KYUUBI #5782] Flink Engine GetInfo support CLI_ODBC_KEYWORDS
b5204d23a is described below
commit b5204d23a875b2e443130beebe29920ef7d6e7d0
Author: yikaifei <[email protected]>
AuthorDate: Mon Nov 27 22:14:41 2023 +0800
[KYUUBI #5782] Flink Engine GetInfo support CLI_ODBC_KEYWORDS
# :mag: Description
## Issue References ๐
This PR aims to support `CLI_ODBC_KEYWORDS` on flink engine to avoid
https://github.com/apache/kyuubi/issues/2637
## Describe Your Solution ๐ง
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that are
required for this change.
## Types of changes :bookmark:
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
## Test Plan ๐งช
#### Behavior Without This Pull Request :coffin:
#### Behavior With This Pull Request :tada:
#### Related Unit Tests
Adjusted existing test
#org.apache.kyuubi.it.flink.operation.FlinkOperationSuite
---
# Checklists
## ๐ Author Self Checklist
- [x] My code follows the [style
guidelines](https://kyuubi.readthedocs.io/en/master/contributing/code/style.html)
of this project
- [x] I have performed a self-review
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature
works
- [x] New and existing unit tests pass locally with my changes
- [x] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
## ๐ Committer Pre-Merge Checklist
- [x] Pull request title is okay.
- [x] No license issues.
- [ ] Milestone correctly set?
- [ ] Test coverage is ok
- [ ] Assignees are selected.
- [ ] Minimum number of approvals
- [ ] No changes are requested
**Be nice. Be informative.**
Closes #5782 from Yikf/flink-CLI_ODBC_KEYWORDS.
Closes #5782
ef0dc049a [yikaifei] Flink GetInfo support CLI_ODBC_KEYWORDS
Authored-by: yikaifei <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
(cherry picked from commit 67bf8e135b8ca6d04101f600696866c407bda442)
Signed-off-by: Cheng Pan <[email protected]>
---
.../scala/org/apache/kyuubi/engine/flink/session/FlinkSessionImpl.scala | 1 +
.../org/apache/kyuubi/it/flink/operation/FlinkOperationSuite.scala | 2 ++
2 files changed, 3 insertions(+)
diff --git
a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSessionImpl.scala
b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSessionImpl.scala
index 5f8f0b8c0..5bfacc694 100644
---
a/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSessionImpl.scala
+++
b/externals/kyuubi-flink-sql-engine/src/main/scala/org/apache/kyuubi/engine/flink/session/FlinkSessionImpl.scala
@@ -109,6 +109,7 @@ class FlinkSessionImpl(
case TGetInfoType.CLI_SERVER_NAME | TGetInfoType.CLI_DBMS_NAME =>
TGetInfoValue.stringValue("Apache Flink")
case TGetInfoType.CLI_DBMS_VER =>
TGetInfoValue.stringValue(EnvironmentInformation.getVersion)
+ case TGetInfoType.CLI_ODBC_KEYWORDS =>
TGetInfoValue.stringValue("Unimplemented")
case _ => throw KyuubiSQLException(s"Unrecognized GetInfoType value:
$infoType")
}
}
diff --git
a/integration-tests/kyuubi-flink-it/src/test/scala/org/apache/kyuubi/it/flink/operation/FlinkOperationSuite.scala
b/integration-tests/kyuubi-flink-it/src/test/scala/org/apache/kyuubi/it/flink/operation/FlinkOperationSuite.scala
index 55476bfd0..b628654bb 100644
---
a/integration-tests/kyuubi-flink-it/src/test/scala/org/apache/kyuubi/it/flink/operation/FlinkOperationSuite.scala
+++
b/integration-tests/kyuubi-flink-it/src/test/scala/org/apache/kyuubi/it/flink/operation/FlinkOperationSuite.scala
@@ -98,6 +98,8 @@ class FlinkOperationSuite extends
WithKyuubiServerAndFlinkMiniCluster
req.setSessionHandle(handle)
req.setInfoType(TGetInfoType.CLI_DBMS_NAME)
assert(client.GetInfo(req).getInfoValue.getStringValue === "Apache
Flink")
+ req.setInfoType(TGetInfoType.CLI_ODBC_KEYWORDS)
+ assert(client.GetInfo(req).getInfoValue.getStringValue ===
"Unimplemented")
}
}
}