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 <[email protected]>
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 <[email protected]>
    Co-authored-by: Cheng Pan <[email protected]>
    Signed-off-by: Cheng Pan <[email protected]>
    (cherry picked from commit f5b89b0945b4911b1d73d24724e81ca554a588ef)
    Signed-off-by: Cheng Pan <[email protected]>
---
 .../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())

Reply via email to