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/01/15 12:37:21 UTC

(kyuubi) branch branch-1.8 updated: [KYUUBI #5977] Fix argument position on constructing Trino ClientSession

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 8bc3325bc [KYUUBI #5977] Fix argument position on constructing Trino ClientSession
8bc3325bc is described below

commit 8bc3325bceafda0f34c8c21250ce0a5e9037f890
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Mon Jan 15 20:37:03 2024 +0800

    [KYUUBI #5977] Fix argument position on constructing Trino ClientSession
    
    # :mag: Description
    ## Issue References ๐Ÿ”—
    
    This pull request fixes argument position on constructing Trino `ClientSession`.
    
    ## Describe Your Solution ๐Ÿ”ง
    
    Invert `properties` and `Collections.emptyMap()` to match the `ClientSession` constructor signature.
    
    ```
        public ClientSession(
                URI server,
                String principal,
                Optional<String> user,
                String source,
                Optional<String> traceToken,
                Set<String> clientTags,
                String clientInfo,
                String catalog,
                String schema,
                String path,
                ZoneId timeZone,
                Locale locale,
                Map<String, String> resourceEstimates,
                Map<String, String> properties,
                Map<String, String> preparedStatements,
                Map<String, ClientSelectedRole> roles,
                Map<String, String> extraCredentials,
                String transactionId,
                Duration clientRequestTimeout,
                boolean compressionDisabled)
    ```
    
    ## Types of changes :bookmark:
    
    - [ ] 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 ๐Ÿงช
    
    Pass GA.
    
    ---
    
    # 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 #5977 from pan3793/trino-props-arg.
    
    Closes #5977
    
    1e0f71ac2 [Cheng Pan] Fix argument position on constructing Trino ClientSession
    
    Authored-by: Cheng Pan <ch...@apache.org>
    Signed-off-by: Cheng Pan <ch...@apache.org>
    (cherry picked from commit dbf70d4b21d95e0829e0f7c5d89b3ac716c04d27)
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 .../scala/org/apache/kyuubi/engine/trino/session/TrinoSessionImpl.scala | 2 +-
 1 file changed, 1 insertion(+), 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 0b3ac01a9..972c76bf6 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
@@ -107,10 +107,10 @@ class TrinoSessionImpl(
       ZoneId.systemDefault(),
       Locale.getDefault,
       Collections.emptyMap(),
-      Collections.emptyMap(),
       properties,
       Collections.emptyMap(),
       Collections.emptyMap(),
+      Collections.emptyMap(),
       null,
       new Duration(clientRequestTimeout, TimeUnit.MILLISECONDS),
       true)