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/03/08 12:39:05 UTC

(kyuubi) branch branch-1.8 updated: [KYUUBI #6147][TRINO] Use the overlay conf as session conf

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 0b537033f [KYUUBI #6147][TRINO] Use the overlay conf as session conf
0b537033f is described below

commit 0b537033fc877845135bfdb78cf7410e0870e446
Author: zwangsheng <bi...@apache.org>
AuthorDate: Fri Mar 8 20:38:37 2024 +0800

    [KYUUBI #6147][TRINO] Use the overlay conf as session conf
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    This pull request fixes #6147
    
    ## Describe Your Solution ๐Ÿ”ง
    
    Overwriting the engine conf with the passed conf consider as the full session conf.
    
    ## 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
    None
    
    ---
    
    # Checklist ๐Ÿ“
    
    - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)
    
    **Be nice. Be informative.**
    
    Closes #6148 from zwangsheng/KYUUBI#6147.
    
    Closes #6147
    
    3e0fb0fb6 [Cheng Pan] Update externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala
    452224e00 [zwangsheng] fix comments
    4ee7c042b [zwangsheng] [KYUUBI #6147][TRINO] Using the overlay conf as session conf
    
    Lead-authored-by: zwangsheng <bi...@apache.org>
    Co-authored-by: Cheng Pan <pa...@gmail.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit f5b89b0945b4911b1d73d24724e81ca554a588ef)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala
index 972c76bf6..8080df799 100644
--- a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala
+++ b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala
@@ -49,7 +49,11 @@ class TrinoSessionImpl(
     sessionManager: SessionManager)
   extends AbstractSession(protocol, user, password, ipAddress, conf, sessionManager) {
 
-  val sessionConf: KyuubiConf = sessionManager.getConf
+  val sessionConf: KyuubiConf = {
+    val engineConf = sessionManager.getConf.clone
+    conf.foreach { case (k, v) => engineConf.set(k, v) }
+    engineConf
+  }
 
   override val handle: SessionHandle =
     conf.get(KYUUBI_SESSION_HANDLE_KEY).map(SessionHandle.fromUUID).getOrElse(SessionHandle())