hddong commented on a change in pull request #1902:
URL: https://github.com/apache/incubator-kyuubi/pull/1902#discussion_r806392574



##########
File path: 
externals/kyuubi-trino-engine/src/test/scala/org/apache/kyuubi/engine/trino/operation/TrinoOperationSuite.scala
##########
@@ -71,6 +71,72 @@ class TrinoOperationSuite extends WithTrinoEngine with 
HiveJDBCTestHelper {
     }
   }
 
+  test("trino - get schemas") {
+    case class SchemaWithCatalog(catalog: String, schema: String)
+
+    withJdbcStatement() { statement =>
+      statement.execute("CREATE SCHEMA IF NOT EXISTS memory.test_escape_1")
+      statement.execute("CREATE SCHEMA IF NOT EXISTS memory.test2escape_1")
+      statement.execute("CREATE SCHEMA IF NOT EXISTS memory.test_escape11")
+
+      val meta = statement.getConnection.getMetaData
+      val resultSetBuffer = ArrayBuffer[SchemaWithCatalog]()
+
+      val schemas1 = meta.getSchemas(null, null)
+      while (schemas1.next()) {
+        resultSetBuffer +=
+          SchemaWithCatalog(schemas1.getString(TABLE_CATALOG), 
schemas1.getString(TABLE_SCHEM))
+      }
+      assert(resultSetBuffer.contains(SchemaWithCatalog("memory", 
"information_schema")))
+      assert(resultSetBuffer.contains(SchemaWithCatalog("system", 
"information_schema")))

Review comment:
       > do trino-jdbc or trino-cli modles expose system tables/dbs to 
end-users?
   
   Yes, it's readable for end-users.




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


Reply via email to