This is an automated email from the ASF dual-hosted git repository.
ulyssesyou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 55c4cae1d [KYUUBI #2347] Output trino query id within query execute
55c4cae1d is described below
commit 55c4cae1d5c7012d869b76a5b80ca65edbefc40a
Author: hongdongdong <[email protected]>
AuthorDate: Wed Apr 13 18:08:08 2022 +0800
[KYUUBI #2347] Output trino query id within query execute
### _Why are the changes needed?_
Output trino query id for debug.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate

- [X] [Run
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
Closes #2347 from hddong/add-trino-query-id.
Closes #2347
5a76476d [hongdongdong] Output trino query id within query execute
Authored-by: hongdongdong <[email protected]>
Signed-off-by: ulysses-you <[email protected]>
---
.../main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
index c1b2472f7..acd1f0408 100644
---
a/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
+++
b/externals/kyuubi-trino-engine/src/main/scala/org/apache/kyuubi/engine/trino/TrinoStatement.scala
@@ -35,6 +35,7 @@ import io.trino.client.StatementClient
import io.trino.client.StatementClientFactory
import org.apache.kyuubi.KyuubiSQLException
+import org.apache.kyuubi.Logging
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.engine.trino.TrinoConf.DATA_PROCESSING_POOL_SIZE
import org.apache.kyuubi.engine.trino.TrinoStatement._
@@ -42,7 +43,10 @@ import org.apache.kyuubi.engine.trino.TrinoStatement._
/**
* Trino client communicate with trino cluster.
*/
-class TrinoStatement(trinoContext: TrinoContext, kyuubiConf: KyuubiConf, sql:
String) {
+class TrinoStatement(
+ trinoContext: TrinoContext,
+ kyuubiConf: KyuubiConf,
+ sql: String) extends Logging {
private lazy val trino = StatementClientFactory
.newStatementClient(trinoContext.httpClient,
trinoContext.clientSession.get, sql)
@@ -61,6 +65,7 @@ class TrinoStatement(trinoContext: TrinoContext, kyuubiConf:
KyuubiConf, sql: St
val results = trino.currentStatusInfo()
val columns = results.getColumns()
if (columns != null) {
+ info(s"Execute with Trino query id: ${results.getId}")
return columns.asScala.toList
}
trino.advance()