You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/12/29 07:14:54 UTC

[GitHub] [incubator-kyuubi] hddong opened a new pull request #1642: [KYUUBI #1641] Add Trino client

hddong opened a new pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642


   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   Add trino client to communicate with trino cluster.
   
   ### _How was this patch tested?_
   - [X] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [ ] Add screenshots for manual tests if appropriate
   
   - [X] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3e4f778) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `1.31%`.
   > The diff coverage is `73.03%`.
   
   > :exclamation: Current head 3e4f778 differs from pull request most recent head 67c2f1f. Consider uploading reports for the commit 67c2f1f to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.64%   +1.31%     
   - Complexity      164      222      +58     
   ============================================
     Files           260      267       +7     
     Lines         12930    13177     +247     
     Branches       1633     1662      +29     
   ============================================
   + Hits           7542     7860     +318     
   + Misses         4756     4651     -105     
   - Partials        632      666      +34     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `70.37% <70.37%> (ø)` | |
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `100.00% <100.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `63.38% <0.00%> (-11.27%)` | :arrow_down: |
   | [...he/kyuubi/engine/spark/repl/KyuubiSparkILoop.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9yZXBsL0t5dXViaVNwYXJrSUxvb3Auc2NhbGE=) | `90.16% <0.00%> (-3.28%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.93% <0.00%> (-1.14%)` | :arrow_down: |
   | [...la/org/apache/kyuubi/session/AbstractSession.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0Fic3RyYWN0U2Vzc2lvbi5zY2FsYQ==) | `94.38% <0.00%> (-1.08%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | ... and [34 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...67c2f1f](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yaooqinn closed pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642


   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r777512680



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {
+
+  private lazy val trino = StatementClientFactory
+    .newStatementClient(trinoContext.httpClient, trinoContext.getClientSession, sql)
+
+  def getTrinoClient: StatementClient = trino
+
+  def getCurrentDatabase: String = trinoContext.getClientSession.getSchema
+
+  def getColumns: List[Column] = {
+    while (trino.isRunning) {
+      val results = trino.currentStatusInfo()
+      val columns = results.getColumns()
+      if (columns != null) {
+        return columns.asScala.toList
+      }
+      trino.advance()
+    }
+    Verify.verify(trino.isFinished())
+    val finalStatus = trino.finalStatusInfo()
+    if (finalStatus.getError == null) {
+      throw KyuubiSQLException(s"Query has no columns (#${finalStatus.getId})")
+    } else {
+      throw KyuubiSQLException(
+        s"Query failed (#${finalStatus.getId}): ${finalStatus.getError.getMessage}")
+    }
+  }
+
+  /**
+   * Execute sql and return ResultSet.
+   */
+  def execute(): Iterable[List[Any]] = {
+    val rowQueue = new ArrayBlockingQueue[List[Any]](MAX_QUEUED_ROWS)
+
+    val future = Future[Unit] {
+      while (trino.isRunning) {
+        val data = trino.currentData().getData()
+        if (data != null) {
+          data.asScala.map(_.asScala.toList)
+            .foreach(e => putOrThrow(rowQueue, e))
+        }
+        trino.advance()
+      }
+    }

Review comment:
       Any blocking operation in this block? IMO, `scala.concurrent.ExecutionContext.Implicits.global` is not a good choise for that. BTW, please give the variable a meaningful name rather than just `future`.




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yaooqinn closed pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642


   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53ce69) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.86%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head d53ce69 differs from pull request most recent head b21b66c. Consider uploading reports for the commit b21b66c to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.19%   +0.86%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13171     +241     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7797     +255     
   + Misses         4756     4714      -42     
   - Partials        632      660      +28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/FlinkEngineUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua0VuZ2luZVV0aWxzLnNjYWxh) | `29.41% <0.00%> (ø)` | |
   | [...e/kyuubi/engine/flink/FlinkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <0.00%> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...b21b66c](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e74f487) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.82%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.15%   +0.82%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13173     +243     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7793     +251     
   + Misses         4756     4721      -35     
   - Partials        632      659      +27     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [...he/kyuubi/engine/spark/repl/KyuubiSparkILoop.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9yZXBsL0t5dXViaVNwYXJrSUxvb3Auc2NhbGE=) | `90.16% <0.00%> (-3.28%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.93% <0.00%> (-1.14%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | ... and [29 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...e74f487](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r778522632



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {
+
+  private lazy val trino = StatementClientFactory
+    .newStatementClient(trinoContext.httpClient, trinoContext.getClientSession, sql)
+
+  def getTrinoClient: StatementClient = trino
+
+  def getCurrentDatabase: String = trinoContext.getClientSession.getSchema
+
+  def getColumns: List[Column] = {
+    while (trino.isRunning) {
+      val results = trino.currentStatusInfo()
+      val columns = results.getColumns()
+      if (columns != null) {
+        return columns.asScala.toList
+      }
+      trino.advance()
+    }
+    Verify.verify(trino.isFinished())
+    val finalStatus = trino.finalStatusInfo()
+    if (finalStatus.getError == null) {
+      throw KyuubiSQLException(s"Query has no columns (#${finalStatus.getId})")
+    } else {
+      throw KyuubiSQLException(
+        s"Query failed (#${finalStatus.getId}): ${finalStatus.getError.getMessage}")
+    }
+  }
+
+  /**
+   * Execute sql and return ResultSet.
+   */
+  def execute(): Iterable[List[Any]] = {
+    val rowQueue = new ArrayBlockingQueue[List[Any]](MAX_QUEUED_ROWS)
+
+    val future = Future[Unit] {
+      while (trino.isRunning) {
+        val data = trino.currentData().getData()
+        if (data != null) {
+          data.asScala.map(_.asScala.toList)
+            .foreach(e => putOrThrow(rowQueue, e))
+        }
+        trino.advance()
+      }
+    }

Review comment:
       Then let's use a dedicated `ExecutionContext` and make the thread size configurable rather than `scala.concurrent.ExecutionContext.Implicits.global`, the global one is something like global fork join pool, usually for noblocking & CPU-heavy calculation.




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] hddong commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
hddong commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r778521454



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {
+
+  private lazy val trino = StatementClientFactory
+    .newStatementClient(trinoContext.httpClient, trinoContext.getClientSession, sql)
+
+  def getTrinoClient: StatementClient = trino
+
+  def getCurrentDatabase: String = trinoContext.getClientSession.getSchema
+
+  def getColumns: List[Column] = {
+    while (trino.isRunning) {
+      val results = trino.currentStatusInfo()
+      val columns = results.getColumns()
+      if (columns != null) {
+        return columns.asScala.toList
+      }
+      trino.advance()
+    }
+    Verify.verify(trino.isFinished())
+    val finalStatus = trino.finalStatusInfo()
+    if (finalStatus.getError == null) {
+      throw KyuubiSQLException(s"Query has no columns (#${finalStatus.getId})")
+    } else {
+      throw KyuubiSQLException(
+        s"Query failed (#${finalStatus.getId}): ${finalStatus.getError.getMessage}")
+    }
+  }
+
+  /**
+   * Execute sql and return ResultSet.
+   */
+  def execute(): Iterable[List[Any]] = {
+    val rowQueue = new ArrayBlockingQueue[List[Any]](MAX_QUEUED_ROWS)
+
+    val future = Future[Unit] {
+      while (trino.isRunning) {
+        val data = trino.currentData().getData()
+        if (data != null) {
+          data.asScala.map(_.asScala.toList)
+            .foreach(e => putOrThrow(rowQueue, e))
+        }
+        trino.advance()
+      }
+    }

Review comment:
       > Any blocking operation in this block?
   
   The resultSet have multiple batches, read and flush to buffer need blocking.
   




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (67c2f1f) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `1.33%`.
   > The diff coverage is `70.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.66%   +1.33%     
   - Complexity      164      220      +56     
   ============================================
     Files           260      268       +8     
     Lines         12930    13194     +264     
     Branches       1633     1662      +29     
   ============================================
   + Hits           7542     7872     +330     
   + Misses         4756     4653     -103     
   - Partials        632      669      +37     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `64.28% <64.28%> (ø)` | |
   | [...ala/org/apache/kyuubi/engine/trino/TrinoConf.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29uZi5zY2FsYQ==) | `100.00% <100.00%> (ø)` | |
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `100.00% <100.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `63.38% <0.00%> (-11.27%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.93% <0.00%> (-1.14%)` | :arrow_down: |
   | [...la/org/apache/kyuubi/session/AbstractSession.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0Fic3RyYWN0U2Vzc2lvbi5zY2FsYQ==) | `94.38% <0.00%> (-1.08%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | ... and [38 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...67c2f1f](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53ce69) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.86%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head d53ce69 differs from pull request most recent head cb4f1ed. Consider uploading reports for the commit cb4f1ed to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.19%   +0.86%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13171     +241     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7797     +255     
   + Misses         4756     4714      -42     
   - Partials        632      660      +28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [...yuubi/engine/flink/FlinkEngineProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvZmxpbmsvRmxpbmtFbmdpbmVQcm9jZXNzQnVpbGRlci5zY2FsYQ==) | `75.90% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/flink/FlinkSQLEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua1NRTEVuZ2luZS5zY2FsYQ==) | `42.10% <0.00%> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...cb4f1ed](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53ce69) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.86%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head d53ce69 differs from pull request most recent head f7f9cdf. Consider uploading reports for the commit f7f9cdf to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.19%   +0.86%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13171     +241     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7797     +255     
   + Misses         4756     4714      -42     
   - Partials        632      660      +28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/FlinkEngineUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua0VuZ2luZVV0aWxzLnNjYWxh) | `29.41% <0.00%> (ø)` | |
   | [...e/kyuubi/engine/flink/FlinkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <0.00%> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...f7f9cdf](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (3e4f778) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `1.31%`.
   > The diff coverage is `73.03%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.64%   +1.31%     
   - Complexity      164      222      +58     
   ============================================
     Files           260      267       +7     
     Lines         12930    13177     +247     
     Branches       1633     1662      +29     
   ============================================
   + Hits           7542     7860     +318     
   + Misses         4756     4651     -105     
   - Partials        632      666      +34     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `70.37% <70.37%> (ø)` | |
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `100.00% <100.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `63.38% <0.00%> (-11.27%)` | :arrow_down: |
   | [...he/kyuubi/engine/spark/repl/KyuubiSparkILoop.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9yZXBsL0t5dXViaVNwYXJrSUxvb3Auc2NhbGE=) | `90.16% <0.00%> (-3.28%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.93% <0.00%> (-1.14%)` | :arrow_down: |
   | [...la/org/apache/kyuubi/session/AbstractSession.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXNzaW9uL0Fic3RyYWN0U2Vzc2lvbi5zY2FsYQ==) | `94.38% <0.00%> (-1.08%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | ... and [34 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...3e4f778](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] hddong commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
hddong commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r778520032



##########
File path: kubernetes/integration-tests/test-trino.yaml
##########
@@ -0,0 +1,143 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Source: trino/templates/configmap-catalog.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: tcb-trino-catalog
+  labels:
+    app: trino
+    chart: trino-0.2.0
+    release: tcb
+    heritage: Helm
+    role: catalogs
+data:
+  tpch.properties: |
+    connector.name=tpch
+    tpch.splits-per-node=4
+  tpcds.properties: |
+    connector.name=tpcds
+    tpcds.splits-per-node=4
+---
+# Source: trino/templates/configmap-coordinator.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: tcb-trino-coordinator
+  labels:
+    app: trino
+    chart: trino-0.2.0
+    release: tcb
+    heritage: Helm
+    component: coordinator
+data:
+  node.properties: |
+    node.environment=production
+    node.data-dir=/data/trino
+    plugin.dir=/usr/lib/trino/plugin
+
+  jvm.config: |
+    -server
+    -Xmx8G

Review comment:
       Have used `testcontainers` instead. ITtest will add when the trino engine complete and will address those comments.




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r777507133



##########
File path: kubernetes/integration-tests/test-trino.yaml
##########
@@ -0,0 +1,143 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Source: trino/templates/configmap-catalog.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: tcb-trino-catalog
+  labels:
+    app: trino
+    chart: trino-0.2.0
+    release: tcb
+    heritage: Helm
+    role: catalogs
+data:
+  tpch.properties: |
+    connector.name=tpch
+    tpch.splits-per-node=4
+  tpcds.properties: |
+    connector.name=tpcds
+    tpcds.splits-per-node=4
+---
+# Source: trino/templates/configmap-coordinator.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: tcb-trino-coordinator
+  labels:
+    app: trino
+    chart: trino-0.2.0
+    release: tcb
+    heritage: Helm
+    component: coordinator
+data:
+  node.properties: |
+    node.environment=production
+    node.data-dir=/data/trino
+    plugin.dir=/usr/lib/trino/plugin
+
+  jvm.config: |
+    -server
+    -Xmx8G

Review comment:
       There is 7G limitation on GitHub Action runner




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r778522632



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {
+
+  private lazy val trino = StatementClientFactory
+    .newStatementClient(trinoContext.httpClient, trinoContext.getClientSession, sql)
+
+  def getTrinoClient: StatementClient = trino
+
+  def getCurrentDatabase: String = trinoContext.getClientSession.getSchema
+
+  def getColumns: List[Column] = {
+    while (trino.isRunning) {
+      val results = trino.currentStatusInfo()
+      val columns = results.getColumns()
+      if (columns != null) {
+        return columns.asScala.toList
+      }
+      trino.advance()
+    }
+    Verify.verify(trino.isFinished())
+    val finalStatus = trino.finalStatusInfo()
+    if (finalStatus.getError == null) {
+      throw KyuubiSQLException(s"Query has no columns (#${finalStatus.getId})")
+    } else {
+      throw KyuubiSQLException(
+        s"Query failed (#${finalStatus.getId}): ${finalStatus.getError.getMessage}")
+    }
+  }
+
+  /**
+   * Execute sql and return ResultSet.
+   */
+  def execute(): Iterable[List[Any]] = {
+    val rowQueue = new ArrayBlockingQueue[List[Any]](MAX_QUEUED_ROWS)
+
+    val future = Future[Unit] {
+      while (trino.isRunning) {
+        val data = trino.currentData().getData()
+        if (data != null) {
+          data.asScala.map(_.asScala.toList)
+            .foreach(e => putOrThrow(rowQueue, e))
+        }
+        trino.advance()
+      }
+    }

Review comment:
       Then let's use a dedicated `ExecutionContext` and make the thread size configurable rather than `scala.concurrent.ExecutionContext.Implicits.global`, the global one is something like global fork join pool, usually for noblocking calculation.




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] hddong commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
hddong commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r776192958



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {

Review comment:
       BTW, for jdbc,  it seems that we can support connecting other JDBC services with `kyuubi-jdbc-engine` in the future.
   For trino, use trino client directly, we can better manage logs, exceptions and progressing. And omit the process of intermediate conversion to `Java.sql`




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53ce69) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.86%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.19%   +0.86%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13171     +241     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7797     +255     
   + Misses         4756     4714      -42     
   - Partials        632      660      +28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [...yuubi/engine/flink/FlinkEngineProcessBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvZmxpbmsvRmxpbmtFbmdpbmVQcm9jZXNzQnVpbGRlci5zY2FsYQ==) | `75.90% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/flink/FlinkSQLEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua1NRTEVuZ2luZS5zY2FsYQ==) | `42.10% <0.00%> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...d53ce69](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (96d1a58) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.85%`.
   > The diff coverage is `0.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.18%   +0.85%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13173     +243     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7796     +254     
   + Misses         4756     4720      -36     
   - Partials        632      657      +25     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.93% <0.00%> (-1.14%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/FlinkEngineUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua0VuZ2luZVV0aWxzLnNjYWxh) | `29.41% <0.00%> (ø)` | |
   | ... and [28 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...96d1a58](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] hddong commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
hddong commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r778635431



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {
+
+  private lazy val trino = StatementClientFactory
+    .newStatementClient(trinoContext.httpClient, trinoContext.getClientSession, sql)
+
+  def getTrinoClient: StatementClient = trino
+
+  def getCurrentDatabase: String = trinoContext.getClientSession.getSchema
+
+  def getColumns: List[Column] = {
+    while (trino.isRunning) {
+      val results = trino.currentStatusInfo()
+      val columns = results.getColumns()
+      if (columns != null) {
+        return columns.asScala.toList
+      }
+      trino.advance()
+    }
+    Verify.verify(trino.isFinished())
+    val finalStatus = trino.finalStatusInfo()
+    if (finalStatus.getError == null) {
+      throw KyuubiSQLException(s"Query has no columns (#${finalStatus.getId})")
+    } else {
+      throw KyuubiSQLException(
+        s"Query failed (#${finalStatus.getId}): ${finalStatus.getError.getMessage}")
+    }
+  }
+
+  /**
+   * Execute sql and return ResultSet.
+   */
+  def execute(): Iterable[List[Any]] = {
+    val rowQueue = new ArrayBlockingQueue[List[Any]](MAX_QUEUED_ROWS)
+
+    val future = Future[Unit] {
+      while (trino.isRunning) {
+        val data = trino.currentData().getData()
+        if (data != null) {
+          data.asScala.map(_.asScala.toList)
+            .foreach(e => putOrThrow(rowQueue, e))
+        }
+        trino.advance()
+      }
+    }

Review comment:
       Have addressed




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] pan3793 commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
pan3793 commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r777507961



##########
File path: kubernetes/integration-tests/test-trino.yaml
##########
@@ -0,0 +1,143 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Source: trino/templates/configmap-catalog.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: tcb-trino-catalog
+  labels:
+    app: trino
+    chart: trino-0.2.0
+    release: tcb
+    heritage: Helm
+    role: catalogs
+data:
+  tpch.properties: |
+    connector.name=tpch
+    tpch.splits-per-node=4
+  tpcds.properties: |
+    connector.name=tpcds
+    tpcds.splits-per-node=4
+---
+# Source: trino/templates/configmap-coordinator.yaml
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: tcb-trino-coordinator
+  labels:
+    app: trino
+    chart: trino-0.2.0
+    release: tcb
+    heritage: Helm
+    component: coordinator
+data:
+  node.properties: |
+    node.environment=production
+    node.data-dir=/data/trino
+    plugin.dir=/usr/lib/trino/plugin
+
+  jvm.config: |
+    -server
+    -Xmx8G
+    -XX:+UseG1GC
+    -XX:G1HeapRegionSize=32M
+    -XX:+UseGCOverheadLimit
+    -XX:+ExplicitGCInvokesConcurrent
+    -XX:+HeapDumpOnOutOfMemoryError
+    -XX:+ExitOnOutOfMemoryError
+    -Djdk.attach.allowAttachSelf=true
+    -XX:-UseBiasedLocking
+    -XX:ReservedCodeCacheSize=512M
+    -XX:PerMethodRecompilationCutoff=10000
+    -XX:PerBytecodeRecompilationCutoff=10000
+    -Djdk.nio.maxCachedBufferSize=2000000
+
+  config.properties: |
+    coordinator=true
+    node-scheduler.include-coordinator=true
+    http-server.http.port=8080
+    query.max-memory=4GB
+    query.max-memory-per-node=1GB
+    query.max-total-memory-per-node=2GB
+    memory.heap-headroom-per-node=1GB
+    discovery-server.enabled=true
+    discovery.uri=http://localhost:8080
+
+  log.properties: |
+    io.trino=INFO
+---
+# Source: trino/templates/deployment-coordinator.yaml
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: tcb-trino-coordinator
+  labels:
+    app: trino
+    chart: trino-0.2.0
+    release: tcb
+    heritage: Helm
+    component: coordinator
+spec:
+  selector:
+    matchLabels:
+      app: trino
+      release: tcb
+      component: coordinator
+  template:
+    metadata:
+      labels:
+        app: trino
+        release: tcb
+        component: coordinator
+    spec:
+      securityContext:
+        runAsUser: 1000
+        runAsGroup: 1000
+      volumes:
+        - name: config-volume
+          configMap:
+            name: tcb-trino-coordinator
+        - name: catalog-volume
+          configMap:
+            name: tcb-trino-catalog
+      imagePullSecrets:
+        - name: registry-credentials
+      containers:
+        - name: trino-coordinator
+          image: "trinodb/trino:latest"

Review comment:
       how about use a specific version rather than latest?




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53ce69) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.86%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head d53ce69 differs from pull request most recent head 96d1a58. Consider uploading reports for the commit 96d1a58 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.19%   +0.86%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13171     +241     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7797     +255     
   + Misses         4756     4714      -42     
   - Partials        632      660      +28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/FlinkEngineUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua0VuZ2luZVV0aWxzLnNjYWxh) | `29.41% <0.00%> (ø)` | |
   | [...e/kyuubi/engine/flink/FlinkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <0.00%> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...96d1a58](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] yaooqinn commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
yaooqinn commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r776183115



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {

Review comment:
       Are we going to fully implement trino-jdbc?




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53ce69) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.86%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head d53ce69 differs from pull request most recent head be893d4. Consider uploading reports for the commit be893d4 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.19%   +0.86%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13171     +241     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7797     +255     
   + Misses         4756     4714      -42     
   - Partials        632      660      +28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/spark/kyuubi/SparkUtilsHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NwYXJrVXRpbHNIZWxwZXIuc2NhbGE=) | `100.00% <0.00%> (ø)` | |
   | [...e/kyuubi/engine/flink/FlinkSQLBackendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua1NRTEJhY2tlbmRTZXJ2aWNlLnNjYWxh) | `100.00% <0.00%> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...be893d4](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (d53ce69) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.86%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head d53ce69 differs from pull request most recent head bf6ade4. Consider uploading reports for the commit bf6ade4 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.19%   +0.86%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13171     +241     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7797     +255     
   + Misses         4756     4714      -42     
   - Partials        632      660      +28     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/FlinkEngineUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua0VuZ2luZVV0aWxzLnNjYWxh) | `29.41% <0.00%> (ø)` | |
   | [...ala/org/apache/spark/kyuubi/SparkUtilsHelper.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3Bhcmsva3l1dWJpL1NwYXJrVXRpbHNIZWxwZXIuc2NhbGE=) | `100.00% <0.00%> (ø)` | |
   | ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...bf6ade4](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (96d1a58) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.85%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head 96d1a58 differs from pull request most recent head e74f487. Consider uploading reports for the commit e74f487 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.18%   +0.85%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13173     +243     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7796     +254     
   + Misses         4756     4720      -36     
   - Partials        632      657      +25     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.93% <0.00%> (-1.14%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/FlinkEngineUtils.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9mbGluay9GbGlua0VuZ2luZVV0aWxzLnNjYWxh) | `29.41% <0.00%> (ø)` | |
   | ... and [28 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...e74f487](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] hddong commented on a change in pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
hddong commented on a change in pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#discussion_r776187691



##########
File path: externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
##########
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.kyuubi.engine.trino
+
+import java.util.ArrayList
+import java.util.concurrent.ArrayBlockingQueue
+
+import scala.collection.JavaConverters._
+import scala.collection.mutable.ArrayBuffer
+import scala.concurrent.ExecutionContext.Implicits.global
+import scala.concurrent.Future
+import scala.concurrent.duration
+import scala.concurrent.duration.Duration
+import scala.util.control.Breaks._
+
+import com.google.common.base.Verify
+import io.trino.client.ClientSession
+import io.trino.client.Column
+import io.trino.client.StatementClient
+import io.trino.client.StatementClientFactory
+
+import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.engine.trino.TrinoStatement._
+
+/**
+ * Trino client communicate with trino cluster.
+ */
+class TrinoStatement(trinoContext: TrinoContext, sql: String) {

Review comment:
       No. Trino client is Restful API, and there is no function to get the resultSet directly. We need to collect result to local, as `execute` does, similar with `spark.sql("sql")`.




-- 
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: commits-unsubscribe@kyuubi.apache.org

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



[GitHub] [incubator-kyuubi] codecov-commenter edited a comment on pull request #1642: [KYUUBI #1641] Add Trino client

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #1642:
URL: https://github.com/apache/incubator-kyuubi/pull/1642#issuecomment-1002958765


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1642](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e74f487) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/2af105a417342c4e51ec550df7259d90e1fe341e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (2af105a) will **increase** coverage by `0.82%`.
   > The diff coverage is `0.00%`.
   
   > :exclamation: Current head e74f487 differs from pull request most recent head 3e4f778. Consider uploading reports for the commit 3e4f778 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1642      +/-   ##
   ============================================
   + Coverage     58.32%   59.15%   +0.82%     
   - Complexity      164      193      +29     
   ============================================
     Files           260      267       +7     
     Lines         12930    13173     +243     
     Branches       1633     1663      +30     
   ============================================
   + Hits           7542     7793     +251     
   + Misses         4756     4721      -35     
   - Partials        632      659      +27     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../org/apache/kyuubi/engine/trino/TrinoContext.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vQ29udGV4dC5zY2FsYQ==) | `0.00% <0.00%> (ø)` | |
   | [...rg/apache/kyuubi/engine/trino/TrinoStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS10cmluby1lbmdpbmUvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL3RyaW5vL1RyaW5vU3RhdGVtZW50LnNjYWxh) | `0.00% <0.00%> (ø)` | |
   | [.../org/apache/kyuubi/operation/KyuubiOperation.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vS3l1dWJpT3BlcmF0aW9uLnNjYWxh) | `64.78% <0.00%> (-9.86%)` | :arrow_down: |
   | [...he/kyuubi/engine/spark/repl/KyuubiSparkILoop.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9yZXBsL0t5dXViaVNwYXJrSUxvb3Auc2NhbGE=) | `90.16% <0.00%> (-3.28%)` | :arrow_down: |
   | [...rc/main/scala/org/apache/spark/ui/EnginePage.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUvc3BhcmsvdWkvRW5naW5lUGFnZS5zY2FsYQ==) | `78.93% <0.00%> (-1.14%)` | :arrow_down: |
   | [.../main/scala/org/apache/kyuubi/server/api/api.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvYXBpL2FwaS5zY2FsYQ==) | `100.00% <0.00%> (ø)` | |
   | [...ala/org/apache/kyuubi/operation/LaunchEngine.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vTGF1bmNoRW5naW5lLnNjYWxh) | `86.36% <0.00%> (ø)` | |
   | [...org/apache/kyuubi/operation/ExecuteStatement.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9vcGVyYXRpb24vRXhlY3V0ZVN0YXRlbWVudC5zY2FsYQ==) | `87.35% <0.00%> (ø)` | |
   | [...g/apache/kyuubi/engine/flink/result/Constants.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9Db25zdGFudHMuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [.../apache/kyuubi/engine/flink/result/ResultKind.java](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1mbGluay1zcWwtZW5naW5lL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9reXV1YmkvZW5naW5lL2ZsaW5rL3Jlc3VsdC9SZXN1bHRLaW5kLmphdmE=) | `100.00% <0.00%> (ø)` | |
   | ... and [29 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [2af105a...3e4f778](https://codecov.io/gh/apache/incubator-kyuubi/pull/1642?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
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: commits-unsubscribe@kyuubi.apache.org

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