iodone commented on code in PR #4323:
URL: https://github.com/apache/kyuubi/pull/4323#discussion_r1105370633
##########
kyuubi-server/src/main/scala/org/apache/kyuubi/server/trino/api/TrinoContext.scala:
##########
@@ -140,15 +142,17 @@ object TrinoContext {
def buildTrinoResponse(qr: QueryResults, trinoContext: TrinoContext):
Response = {
val responseBuilder = Response.ok(qr)
- trinoContext.catalog.foreach(
- responseBuilder.header(TRINO_HEADERS.responseSetCatalog, _))
- trinoContext.schema.foreach(
- responseBuilder.header(TRINO_HEADERS.responseSetSchema, _))
+ // Note, We have injected kyuubi session id to session context so that the
next query can find
+ // the previous session to restore the query context.
+ // It's hard to follow the Trino style that set all context to http
headers.
+ // Because we do not know the context at server side. e.g. `set k=v`, `use
database`.
+ // We also can not inject other session context into header before we
supporting to map
+ // query result to session context.
Review Comment:
Instead of returning all session information to the client with HTTP
response header, set it to sessionConfig and use kyuubi session to save the
session information in server side?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]