Skip to content

Commit

Permalink
[KYUUBI #6147][TRINO] Use the overlay conf as session conf
Browse files Browse the repository at this point in the history
# 🔍 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 🔖

- [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 ⚰️

#### Behavior With This Pull Request 🎉

#### 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

3e0fb0f [Cheng Pan] Update externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala
452224e [zwangsheng] fix comments
4ee7c04 [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 f5b89b0)
Signed-off-by: Cheng Pan <[email protected]>
  • Loading branch information
zwangsheng and pan3793 committed Mar 8, 2024
1 parent ee68ca1 commit 0b53703
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 0b53703

Please sign in to comment.