You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2024/04/01 03:02:17 UTC

(kyuubi) branch master updated: [KYUUBI #6228] Dropdown Selection and Parameter Parsing Issues in Kyuubi SQL Editor

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 <ji...@gmail.com>
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.
    ![image](https://github.com/apache/kyuubi/assets/18082602/fc84e089-725f-4481-b7eb-e0bd33ec28ce)
    ![image](https://github.com/apache/kyuubi/assets/18082602/b8842e55-886f-4651-81a2-b9c4a4965bdf)
    
    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.
    ![image](https://github.com/apache/kyuubi/assets/18082602/31aa6fcf-ad75-40df-804f-8946d7ffee9e)
    ![image](https://github.com/apache/kyuubi/assets/18082602/432b320a-86d7-42c6-a11c-8efe560182d3)
    ![image](https://github.com/apache/kyuubi/assets/18082602/5a50fb22-633f-4a82-ba11-bd3b6d29541a)
    
    #### 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 <ji...@gmail.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 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