You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "zwangsheng (via GitHub)" <gi...@apache.org> on 2024/03/08 06:50:03 UTC

[PR] [KYUUBI #6147][TRINO] Using the overlay conf as session conf [kyuubi]

zwangsheng opened a new pull request, #6148:
URL: https://github.com/apache/kyuubi/pull/6148

   # :mag: Description
   ## Issue References ๐Ÿ”—
   <!-- Append the issue number after #. If there is no issue for you to link create one or -->
   <!-- If there are no issues to link, please provide details here. -->
   
   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:
   <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
   - [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 ๐Ÿ“
   <!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
   <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
   
   - [x] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html)
   
   **Be nice. Be informative.**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Use the overlay conf as session conf [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#discussion_r1517632511


##########
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(kv => engineConf.set(kv._1, kv._2))

Review Comment:
   ```suggestion
       conf.foreach { case (k, v) => engineConf.set(k, v) }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Using the overlay conf as session conf [kyuubi]

Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#discussion_r1517360550


##########
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
+    conf.foreach(kv => engineConf.set(kv._1, kv._2))

Review Comment:
   https://github.com/apache/kyuubi/pull/2808
   
   https://github.com/apache/kyuubi/pull/2808/commits/d0f479831a5fca72dc10bf97f2627b05ac07946b



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Using the overlay conf as session conf [kyuubi]

Posted by "zwangsheng (via GitHub)" <gi...@apache.org>.
zwangsheng commented on code in PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#discussion_r1517292236


##########
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
+    conf.foreach(kv => engineConf.set(kv._1, kv._2))

Review Comment:
   thanks for catch, using `sessionManager.getConf.clone` instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Using the overlay conf as session conf [kyuubi]

Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#discussion_r1517247902


##########
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
+    conf.foreach(kv => engineConf.set(kv._1, kv._2))

Review Comment:
   Will this not pollute the engine conf?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Use the overlay conf as session conf [kyuubi]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#issuecomment-1985578271

   ## [Codecov](https://app.codecov.io/gh/apache/kyuubi/pull/6148?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   All modified and coverable lines are covered by tests :white_check_mark:
   > Project coverage is 60.98%. Comparing base [(`6fc7552`)](https://app.codecov.io/gh/apache/kyuubi/commit/6fc7552ef05c83cfb8a2cd56d80c02c6e8a033c7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`452224e`)](https://app.codecov.io/gh/apache/kyuubi/pull/6148?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   > :exclamation: Current head 452224e differs from pull request most recent head 3e0fb0f. Consider uploading reports for the commit 3e0fb0f to get more accurate results
   
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #6148      +/-   ##
   ============================================
   - Coverage     61.08%   60.98%   -0.11%     
     Complexity       24       24              
   ============================================
     Files           625      625              
     Lines         37219    37219              
     Branches       5029     5029              
   ============================================
   - Hits          22737    22699      -38     
   - Misses        12029    12065      +36     
   - Partials       2453     2455       +2     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/kyuubi/pull/6148?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Use the overlay conf as session conf [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#issuecomment-1985622706

   Thanks, merged to master/1.8.2


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Using the overlay conf as session conf [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on code in PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#discussion_r1517356740


##########
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
+    conf.foreach(kv => engineConf.set(kv._1, kv._2))

Review Comment:
   @cxzl25 seems we lack a pre-assembled session conf in AbstractSession, we need some major refactor to simplify the current conf evaluation, I roughly remember you have raised a similar idea previously.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Using the overlay conf as session conf [kyuubi]

Posted by "cxzl25 (via GitHub)" <gi...@apache.org>.
cxzl25 commented on code in PR #6148:
URL: https://github.com/apache/kyuubi/pull/6148#discussion_r1517360550


##########
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
+    conf.foreach(kv => engineConf.set(kv._1, kv._2))

Review Comment:
   https://github.com/apache/kyuubi/pull/2808/commits/d0f479831a5fca72dc10bf97f2627b05ac07946b



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [PR] [KYUUBI #6147][TRINO] Use the overlay conf as session conf [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #6148: [KYUUBI #6147][TRINO] Use the overlay conf as session conf
URL: https://github.com/apache/kyuubi/pull/6148


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org