This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new d0448f252 [KYUUBI #6228] Dropdown Selection and Parameter Parsing
Issues in Kyuubi SQL Editor
d0448f252 is described below
commit d0448f25205f06950d755b5c49084a4ce3b5fd04
Author: jialiang <[email protected]>
AuthorDate: Mon Apr 1 11:02:07 2024 +0800
[KYUUBI #6228] Dropdown Selection and Parameter Parsing Issues in Kyuubi
SQL Editor
## Issue References ๐
This pull request fixes https://github.com/apache/kyuubi/issues/6228
issue Description:
Using the branch kyuubi 1.9.0
1. The kyuubi sql editor frontend dropdown menu cannot select the
submission type.
Solution: Set disabled to false.
Issue 2: After making the change in step one, the sql editor can select
different types of sql type, but regardless of the selected type, the backend
always initiates a spark engine. Upon investigation, it was found that the
frontend parameter settings were inappropriate. The key in the JSON and the
constructor parameter names in the backend request object did not match,
leading to parsing failure, and the parameters were always null.


Solution: Modify the parameter name.
## 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:
The kyuubi sql editor frontend dropdown menu cannot select the submission
type.
regardless of the selected type, the backend always initiates a spark
engine
#### Behavior With This Pull Request :tada:
Manual testing. After modification, the backend request can obtain the
parameters normally and initiate the corresponding type of engine.



#### Related Unit Tests
---
# Checklist ๐
- [ ] This patch was not authored or co-authored using [Generative
Tooling](https://www.apache.org/legal/generative-tooling.html)
**Be nice. Be informative.**
Closes #6227 from JiaLiangC/fix_sqleditor_opensession_parameters.
Closes #6228
e24b2d975 [jialiang] Fix Dropdown Selection and Parameter Parsing Issues in
Kyuubi SQL Editor
Authored-by: jialiang <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
kyuubi-server/web-ui/src/api/editor/types.ts | 6 +++++-
kyuubi-server/web-ui/src/views/editor/components/Editor.vue | 4 ++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/kyuubi-server/web-ui/src/api/editor/types.ts
b/kyuubi-server/web-ui/src/api/editor/types.ts
index 0bc4c2086..c2e4016cd 100644
--- a/kyuubi-server/web-ui/src/api/editor/types.ts
+++ b/kyuubi-server/web-ui/src/api/editor/types.ts
@@ -15,8 +15,12 @@
* limitations under the License.
*/
+interface ISessionConfigs {
+ [key: string]: string
+}
+
interface IOpenSessionRequest {
- 'kyuubi.engine.type': string
+ configs: ISessionConfigs
}
interface IRunSqlRequest {
diff --git a/kyuubi-server/web-ui/src/views/editor/components/Editor.vue
b/kyuubi-server/web-ui/src/views/editor/components/Editor.vue
index 21faee5a3..c1bdbaa09 100644
--- a/kyuubi-server/web-ui/src/views/editor/components/Editor.vue
+++ b/kyuubi-server/web-ui/src/views/editor/components/Editor.vue
@@ -44,7 +44,7 @@
</el-dropdown>
<el-select
v-model="param.engineType"
- disabled
+ :disabled="false"
:placeholder="$t('engine_type')">
<el-option
v-for="item in getEngineType()"
@@ -151,7 +151,7 @@
if (!sessionIdentifier.value) {
const openSessionResponse: IResponse = await openSession({
- 'kyuubi.engine.type': param.engineType
+ configs: { 'kyuubi.engine.type': param.engineType }
}).catch(catchSessionError)
if (!openSessionResponse) return
sessionIdentifier.value = openSessionResponse.identifier