You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/07/20 20:01:09 UTC

[GitHub] [spark] MaxGekk opened a new pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

MaxGekk opened a new pull request #29168:
URL: https://github.com/apache/spark/pull/29168


   ### What changes were proposed in this pull request?
   This PR implements basic functionalities of the `TableCatalog` interface, so that end-users can use the JDBC as a catalog.
   
   ### Why are the changes needed?
   To have at least one built implementation of Catalog Plugin API available to end users. JDBC is perfectly fit for this.
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   ### How was this patch tested?
   By new test suite `JDBCTableCatalogSuite`.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29168:
URL: https://github.com/apache/spark/pull/29168#discussion_r459929317



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
##########
@@ -0,0 +1,108 @@
+/*
+ * 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.spark.sql.execution.datasources.v2.jdbc
+
+import java.sql.{Connection, DriverManager}
+import java.util.Properties
+
+import org.apache.spark.SparkConf
+import org.apache.spark.sql.{QueryTest, Row}
+import org.apache.spark.sql.test.SharedSparkSession
+import org.apache.spark.sql.types.{IntegerType, StringType, StructType}
+import org.apache.spark.util.Utils
+
+class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
+
+  val tempDir = Utils.createTempDir()
+  val url = s"jdbc:h2:${tempDir.getCanonicalPath};user=testUser;password=testPass"
+  var conn: java.sql.Connection = null
+
+  override def sparkConf: SparkConf = super.sparkConf
+    .set("spark.sql.catalog.h2", classOf[JDBCTableCatalog].getName)
+    .set("spark.sql.catalog.h2.url", url)
+    .set("spark.sql.catalog.h2.driver", "org.h2.Driver")
+
+  private def withConnection[T](f: Connection => T): T = {
+    val conn = DriverManager.getConnection(url, new Properties())
+    try {
+      f(conn)
+    } finally {
+      conn.close()
+    }
+  }
+
+  override def beforeAll(): Unit = {
+    super.beforeAll()
+    Utils.classForName("org.h2.Driver")
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE SCHEMA "test"""").executeUpdate()
+      conn.prepareStatement(
+        """CREATE TABLE "test"."people" (name TEXT(32) NOT NULL, id INTEGER NOT NULL)""")
+        .executeUpdate()
+    }
+  }
+
+  override def afterAll(): Unit = {
+    Utils.deleteRecursively(tempDir)
+    super.afterAll()
+  }
+
+  test("show tables") {
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+  }
+
+  test("drop a table and test whether the table exists") {
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE TABLE "test"."to_drop" (id INTEGER)""").executeUpdate()

Review comment:
       does it have to be `"test"."to_drop"`?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662324201


   **[Test build #126318 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126318/testReport)** for PR 29168 at commit [`c4cc924`](https://github.com/apache/spark/commit/c4cc924625f420ec6236a24cd5f8f76214a12919).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662932689


   Merged build finished. Test FAILed.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663629542






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663493700


   **[Test build #126499 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126499/testReport)** for PR 29168 at commit [`9b7aa8d`](https://github.com/apache/spark/commit/9b7aa8d0fbc79897fa652fa7b5faf0b9d076692f).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-661306022






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-661516112






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662932696


   Test FAILed.
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/126398/
   Test FAILed.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on a change in pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #29168:
URL: https://github.com/apache/spark/pull/29168#discussion_r459994475



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
##########
@@ -0,0 +1,108 @@
+/*
+ * 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.spark.sql.execution.datasources.v2.jdbc
+
+import java.sql.{Connection, DriverManager}
+import java.util.Properties
+
+import org.apache.spark.SparkConf
+import org.apache.spark.sql.{QueryTest, Row}
+import org.apache.spark.sql.test.SharedSparkSession
+import org.apache.spark.sql.types.{IntegerType, StringType, StructType}
+import org.apache.spark.util.Utils
+
+class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
+
+  val tempDir = Utils.createTempDir()
+  val url = s"jdbc:h2:${tempDir.getCanonicalPath};user=testUser;password=testPass"
+  var conn: java.sql.Connection = null
+
+  override def sparkConf: SparkConf = super.sparkConf
+    .set("spark.sql.catalog.h2", classOf[JDBCTableCatalog].getName)
+    .set("spark.sql.catalog.h2.url", url)
+    .set("spark.sql.catalog.h2.driver", "org.h2.Driver")
+
+  private def withConnection[T](f: Connection => T): T = {
+    val conn = DriverManager.getConnection(url, new Properties())
+    try {
+      f(conn)
+    } finally {
+      conn.close()
+    }
+  }
+
+  override def beforeAll(): Unit = {
+    super.beforeAll()
+    Utils.classForName("org.h2.Driver")
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE SCHEMA "test"""").executeUpdate()
+      conn.prepareStatement(
+        """CREATE TABLE "test"."people" (name TEXT(32) NOT NULL, id INTEGER NOT NULL)""")
+        .executeUpdate()
+    }
+  }
+
+  override def afterAll(): Unit = {
+    Utils.deleteRecursively(tempDir)
+    super.afterAll()
+  }
+
+  test("show tables") {
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+  }
+
+  test("drop a table and test whether the table exists") {
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE TABLE "test"."to_drop" (id INTEGER)""").executeUpdate()
+    }
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "to_drop"), Row("test", "people")))
+    sql("DROP TABLE h2.test.to_drop")
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+  }
+
+  test("rename a table") {
+    withTable("h2.test.dst_table") {
+      withConnection { conn =>
+        conn.prepareStatement("""CREATE TABLE "test"."src_table" (id INTEGER)""").executeUpdate()
+      }
+      checkAnswer(
+        sql("SHOW TABLES IN h2.test"),
+        Seq(Row("test", "src_table"), Row("test", "people")))
+      sql("ALTER TABLE h2.test.src_table RENAME TO test.dst_table")
+      checkAnswer(
+        sql("SHOW TABLES IN h2.test"),
+        Seq(Row("test", "dst_table"), Row("test", "people")))
+    }
+  }
+
+  test("load a table") {
+    val t = spark.table("h2.test.people")
+    val expectedSchema = new StructType()
+      .add("NAME", StringType)
+      .add("ID", IntegerType)
+    assert(t.schema === expectedSchema)
+  }
+
+  test("create a table") {
+    withTable("h2.test.new_table") {
+      sql("CREATE TABLE h2.test.new_table(i INT, j STRING) USING _")

Review comment:
       https://issues.apache.org/jira/browse/SPARK-32427




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662192212






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662662506


   **[Test build #126356 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126356/testReport)** for PR 29168 at commit [`5a64c63`](https://github.com/apache/spark/commit/5a64c638cf5bda64796bb7dc3c3b571100ef4060).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-661514577


   **[Test build #126197 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126197/testReport)** for PR 29168 at commit [`43c35fc`](https://github.com/apache/spark/commit/43c35fc8ed87933318fa0e1de68d43ef2e36e3d5).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662092672






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29168:
URL: https://github.com/apache/spark/pull/29168#discussion_r459929628



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
##########
@@ -0,0 +1,108 @@
+/*
+ * 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.spark.sql.execution.datasources.v2.jdbc
+
+import java.sql.{Connection, DriverManager}
+import java.util.Properties
+
+import org.apache.spark.SparkConf
+import org.apache.spark.sql.{QueryTest, Row}
+import org.apache.spark.sql.test.SharedSparkSession
+import org.apache.spark.sql.types.{IntegerType, StringType, StructType}
+import org.apache.spark.util.Utils
+
+class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
+
+  val tempDir = Utils.createTempDir()
+  val url = s"jdbc:h2:${tempDir.getCanonicalPath};user=testUser;password=testPass"
+  var conn: java.sql.Connection = null
+
+  override def sparkConf: SparkConf = super.sparkConf
+    .set("spark.sql.catalog.h2", classOf[JDBCTableCatalog].getName)
+    .set("spark.sql.catalog.h2.url", url)
+    .set("spark.sql.catalog.h2.driver", "org.h2.Driver")
+
+  private def withConnection[T](f: Connection => T): T = {
+    val conn = DriverManager.getConnection(url, new Properties())
+    try {
+      f(conn)
+    } finally {
+      conn.close()
+    }
+  }
+
+  override def beforeAll(): Unit = {
+    super.beforeAll()
+    Utils.classForName("org.h2.Driver")
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE SCHEMA "test"""").executeUpdate()
+      conn.prepareStatement(
+        """CREATE TABLE "test"."people" (name TEXT(32) NOT NULL, id INTEGER NOT NULL)""")
+        .executeUpdate()
+    }
+  }
+
+  override def afterAll(): Unit = {
+    Utils.deleteRecursively(tempDir)
+    super.afterAll()
+  }
+
+  test("show tables") {
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+  }
+
+  test("drop a table and test whether the table exists") {
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE TABLE "test"."to_drop" (id INTEGER)""").executeUpdate()

Review comment:
       ah, otherwise it's upper-cased.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662866695


   **[Test build #126398 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126398/testReport)** for PR 29168 at commit [`56b3329`](https://github.com/apache/spark/commit/56b3329b86a53723e4a9be5df9f0501811b6c4eb).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663629542






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662771853






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662867181






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663103849






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662324201


   **[Test build #126318 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126318/testReport)** for PR 29168 at commit [`c4cc924`](https://github.com/apache/spark/commit/c4cc924625f420ec6236a24cd5f8f76214a12919).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662486290






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662771853






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29168:
URL: https://github.com/apache/spark/pull/29168#discussion_r459929903



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalogSuite.scala
##########
@@ -0,0 +1,108 @@
+/*
+ * 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.spark.sql.execution.datasources.v2.jdbc
+
+import java.sql.{Connection, DriverManager}
+import java.util.Properties
+
+import org.apache.spark.SparkConf
+import org.apache.spark.sql.{QueryTest, Row}
+import org.apache.spark.sql.test.SharedSparkSession
+import org.apache.spark.sql.types.{IntegerType, StringType, StructType}
+import org.apache.spark.util.Utils
+
+class JDBCTableCatalogSuite extends QueryTest with SharedSparkSession {
+
+  val tempDir = Utils.createTempDir()
+  val url = s"jdbc:h2:${tempDir.getCanonicalPath};user=testUser;password=testPass"
+  var conn: java.sql.Connection = null
+
+  override def sparkConf: SparkConf = super.sparkConf
+    .set("spark.sql.catalog.h2", classOf[JDBCTableCatalog].getName)
+    .set("spark.sql.catalog.h2.url", url)
+    .set("spark.sql.catalog.h2.driver", "org.h2.Driver")
+
+  private def withConnection[T](f: Connection => T): T = {
+    val conn = DriverManager.getConnection(url, new Properties())
+    try {
+      f(conn)
+    } finally {
+      conn.close()
+    }
+  }
+
+  override def beforeAll(): Unit = {
+    super.beforeAll()
+    Utils.classForName("org.h2.Driver")
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE SCHEMA "test"""").executeUpdate()
+      conn.prepareStatement(
+        """CREATE TABLE "test"."people" (name TEXT(32) NOT NULL, id INTEGER NOT NULL)""")
+        .executeUpdate()
+    }
+  }
+
+  override def afterAll(): Unit = {
+    Utils.deleteRecursively(tempDir)
+    super.afterAll()
+  }
+
+  test("show tables") {
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+  }
+
+  test("drop a table and test whether the table exists") {
+    withConnection { conn =>
+      conn.prepareStatement("""CREATE TABLE "test"."to_drop" (id INTEGER)""").executeUpdate()
+    }
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "to_drop"), Row("test", "people")))
+    sql("DROP TABLE h2.test.to_drop")
+    checkAnswer(sql("SHOW TABLES IN h2.test"), Seq(Row("test", "people")))
+  }
+
+  test("rename a table") {
+    withTable("h2.test.dst_table") {
+      withConnection { conn =>
+        conn.prepareStatement("""CREATE TABLE "test"."src_table" (id INTEGER)""").executeUpdate()
+      }
+      checkAnswer(
+        sql("SHOW TABLES IN h2.test"),
+        Seq(Row("test", "src_table"), Row("test", "people")))
+      sql("ALTER TABLE h2.test.src_table RENAME TO test.dst_table")
+      checkAnswer(
+        sql("SHOW TABLES IN h2.test"),
+        Seq(Row("test", "dst_table"), Row("test", "people")))
+    }
+  }
+
+  test("load a table") {
+    val t = spark.table("h2.test.people")
+    val expectedSchema = new StructType()
+      .add("NAME", StringType)
+      .add("ID", IntegerType)
+    assert(t.schema === expectedSchema)
+  }
+
+  test("create a table") {
+    withTable("h2.test.new_table") {
+      sql("CREATE TABLE h2.test.new_table(i INT, j STRING) USING _")

Review comment:
       can we add a TODO to omit USING?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663103849






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663494121






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662485050


   **[Test build #126318 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126318/testReport)** for PR 29168 at commit [`c4cc924`](https://github.com/apache/spark/commit/c4cc924625f420ec6236a24cd5f8f76214a12919).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `case class JDBCTable(ident: Identifier, schema: StructType, jdbcOptions: JDBCOptions)`


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662195688






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663494121






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-661306022






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662954659


   **[Test build #126407 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126407/testReport)** for PR 29168 at commit [`d84503a`](https://github.com/apache/spark/commit/d84503a0a361a9c69cc46c00c2b8700bf8c93515).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662954659


   **[Test build #126407 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126407/testReport)** for PR 29168 at commit [`d84503a`](https://github.com/apache/spark/commit/d84503a0a361a9c69cc46c00c2b8700bf8c93515).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-661305415


   **[Test build #126197 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126197/testReport)** for PR 29168 at commit [`43c35fc`](https://github.com/apache/spark/commit/43c35fc8ed87933318fa0e1de68d43ef2e36e3d5).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663558964


   All github actions pass, merging to master!


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662866695


   **[Test build #126398 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126398/testReport)** for PR 29168 at commit [`56b3329`](https://github.com/apache/spark/commit/56b3329b86a53723e4a9be5df9f0501811b6c4eb).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-661305415


   **[Test build #126197 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126197/testReport)** for PR 29168 at commit [`43c35fc`](https://github.com/apache/spark/commit/43c35fc8ed87933318fa0e1de68d43ef2e36e3d5).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662932689






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662867181






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662077929


   **[Test build #126275 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126275/testReport)** for PR 29168 at commit [`6669587`](https://github.com/apache/spark/commit/66695879ed355f602373f0166540ddbeda195ca1).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662662506


   **[Test build #126356 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126356/testReport)** for PR 29168 at commit [`5a64c63`](https://github.com/apache/spark/commit/5a64c638cf5bda64796bb7dc3c3b571100ef4060).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662195688






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663102953


   **[Test build #126407 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126407/testReport)** for PR 29168 at commit [`d84503a`](https://github.com/apache/spark/commit/d84503a0a361a9c69cc46c00c2b8700bf8c93515).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662078395






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662771464


   **[Test build #126356 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126356/testReport)** for PR 29168 at commit [`5a64c63`](https://github.com/apache/spark/commit/5a64c638cf5bda64796bb7dc3c3b571100ef4060).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662486290






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan edited a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan edited a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663423508


   LGTM except some minor 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662324831






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662078395






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29168:
URL: https://github.com/apache/spark/pull/29168#discussion_r459928951



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.spark.sql.execution.datasources.v2.jdbc
+
+import java.sql.{Connection, SQLException}
+
+import scala.collection.JavaConverters._
+
+import org.apache.spark.internal.Logging
+import org.apache.spark.sql.catalyst.analysis.{NoSuchNamespaceException, NoSuchTableException}
+import org.apache.spark.sql.connector.catalog.{Identifier, Table, TableCatalog, TableChange}
+import org.apache.spark.sql.connector.expressions.Transform
+import org.apache.spark.sql.execution.datasources.jdbc.{JDBCOptions, JdbcOptionsInWrite, JDBCRDD, JdbcUtils}
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.jdbc.{JdbcDialect, JdbcDialects}
+import org.apache.spark.sql.types.StructType
+import org.apache.spark.sql.util.CaseInsensitiveStringMap
+
+class JDBCTableCatalog extends TableCatalog with Logging {
+
+  private var catalogName: String = null
+  private var options: JDBCOptions = _
+  private var dialect: JdbcDialect = _
+
+  override def name(): String = {
+    require(catalogName != null, "The JDBC table catalog is not initialed")
+    catalogName
+  }
+
+  override def initialize(name: String, options: CaseInsensitiveStringMap): Unit = {
+    assert(catalogName == null, "The JDBC table catalog is already initialed")
+    catalogName = name
+
+    val map = options.asCaseSensitiveMap().asScala.toMap
+    // The `JDBCOptions` checks the existence of the table option. This is required by JDBC v1, but
+    // JDBC V2 only knows the table option when loading a table. Here we put a table option with a
+    // fake value, so that it can pass the check of `JDBCOptions`.
+    this.options = new JDBCOptions(map + (JDBCOptions.JDBC_TABLE_NAME -> "__invalid_dbtable"))
+    dialect = JdbcDialects.get(this.options.url)
+  }
+
+  override def listTables(namespace: Array[String]): Array[Identifier] = {
+    checkNamespace(namespace)
+    withConnection { conn =>
+      val rs = conn.getMetaData
+        .getTables(null, schemaPattern(namespace), "%", Array("TABLE"));
+      new Iterator[Identifier] {
+        def hasNext = rs.next()
+        def next = Identifier.of(namespace, rs.getString("TABLE_NAME"))
+      }.toArray
+    }
+  }
+
+  override def tableExists(ident: Identifier): Boolean = {
+    checkNamespace(ident.namespace())
+    val writeOptions = new JdbcOptionsInWrite(
+      options.parameters + (JDBCOptions.JDBC_TABLE_NAME -> getTableName(ident)))
+    withConnection(JdbcUtils.tableExists(_, writeOptions))
+  }
+
+  override def dropTable(ident: Identifier): Boolean = {
+    checkNamespace(ident.namespace())
+    withConnection { conn =>
+      try {
+        JdbcUtils.dropTable(conn, getTableName(ident), options)
+        true
+      } catch {
+        case _: SQLException => false
+      }
+    }
+  }
+
+  override def renameTable(oldIdent: Identifier, newIdent: Identifier): Unit = {
+    checkNamespace(oldIdent.namespace())
+    withConnection { conn =>
+      JdbcUtils.renameTable(conn, getTableName(oldIdent), getTableName(newIdent), options)
+    }
+  }
+
+  override def loadTable(ident: Identifier): Table = {
+    checkNamespace(ident.namespace())
+    val optionsWithTableName = new JDBCOptions(
+      options.parameters + (JDBCOptions.JDBC_TABLE_NAME -> getTableName(ident)))
+    try {
+      val schema = JDBCRDD.resolveTable(optionsWithTableName)
+      JDBCTable(ident, schema, optionsWithTableName)
+    } catch {
+      case _: SQLException => throw new NoSuchTableException(ident)
+    }
+  }
+
+  override def createTable(
+      ident: Identifier,
+      schema: StructType,
+      partitions: Array[Transform],
+      properties: java.util.Map[String, String]): Table = {
+      checkNamespace(ident.namespace())
+    if (partitions.nonEmpty) {
+      throw new UnsupportedOperationException("Cannot create JDBC table with partition")
+    }
+    // TODO (SPARK-32405): Apply table options while creating tables in JDBC Table Catalog
+    if (!properties.isEmpty) {
+      logWarning("Cannot create JDBC table with properties, these properties will be " +
+        "ignored: " + properties.asScala.map { case (k, v) => s"$k=$v" }.mkString("[", ", ", "]"))
+    }
+
+    val writeOptions = new JdbcOptionsInWrite(
+      options.parameters + (JDBCOptions.JDBC_TABLE_NAME -> getTableName(ident)))
+    val caseSensitive = SQLConf.get.caseSensitiveAnalysis
+    withConnection { conn =>
+      JdbcUtils.createTable(conn, getTableName(ident), schema, caseSensitive, writeOptions)
+    }
+
+    JDBCTable(ident, schema, writeOptions)
+  }
+
+  // TODO (SPARK-32402): Implement ALTER TABLE in JDBC Table Catalog
+  override def alterTable(ident: Identifier, changes: TableChange*): Table = {
+    // scalastyle:off throwerror
+    throw new NotImplementedError()
+    // scalastyle:on throwerror
+  }
+
+  private def checkNamespace(namespace: Array[String]): Unit = {
+    // In JDBC there is no nested database/schema
+    if (namespace.length > 1) {
+      throw new NoSuchNamespaceException(namespace)
+    }
+  }
+
+  private def withConnection[T](f: Connection => T): T = {
+    val conn = JdbcUtils.createConnectionFactory(options)()
+    try {
+      f(conn)
+    } finally {
+      conn.close()
+    }
+  }
+
+  private def getTableName(ident: Identifier): String = {
+    (ident.namespace() :+ ident.name()).map(dialect.quoteIdentifier).mkString(".")
+  }
+
+  private def schemaPattern(namespaces: Array[String]): String = {

Review comment:
       it's only used once, shall we inline it?




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662324831






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on a change in pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #29168:
URL: https://github.com/apache/spark/pull/29168#discussion_r459927768



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/jdbc/JDBCTableCatalog.scala
##########
@@ -0,0 +1,161 @@
+/*
+ * 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.spark.sql.execution.datasources.v2.jdbc
+
+import java.sql.{Connection, SQLException}
+
+import scala.collection.JavaConverters._
+
+import org.apache.spark.internal.Logging
+import org.apache.spark.sql.catalyst.analysis.{NoSuchNamespaceException, NoSuchTableException}
+import org.apache.spark.sql.connector.catalog.{Identifier, Table, TableCatalog, TableChange}
+import org.apache.spark.sql.connector.expressions.Transform
+import org.apache.spark.sql.execution.datasources.jdbc.{JDBCOptions, JdbcOptionsInWrite, JDBCRDD, JdbcUtils}
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.sql.jdbc.{JdbcDialect, JdbcDialects}
+import org.apache.spark.sql.types.StructType
+import org.apache.spark.sql.util.CaseInsensitiveStringMap
+
+class JDBCTableCatalog extends TableCatalog with Logging {
+
+  private var catalogName: String = null
+  private var options: JDBCOptions = _
+  private var dialect: JdbcDialect = _
+
+  override def name(): String = {
+    require(catalogName != null, "The JDBC table catalog is not initialed")
+    catalogName
+  }
+
+  override def initialize(name: String, options: CaseInsensitiveStringMap): Unit = {
+    assert(catalogName == null, "The JDBC table catalog is already initialed")
+    catalogName = name
+
+    val map = options.asCaseSensitiveMap().asScala.toMap
+    // The `JDBCOptions` checks the existence of the table option. This is required by JDBC v1, but
+    // JDBC V2 only knows the table option when loading a table. Here we put a table option with a
+    // fake value, so that it can pass the check of `JDBCOptions`.
+    this.options = new JDBCOptions(map + (JDBCOptions.JDBC_TABLE_NAME -> "__invalid_dbtable"))
+    dialect = JdbcDialects.get(this.options.url)
+  }
+
+  override def listTables(namespace: Array[String]): Array[Identifier] = {
+    checkNamespace(namespace)
+    withConnection { conn =>
+      val rs = conn.getMetaData
+        .getTables(null, schemaPattern(namespace), "%", Array("TABLE"));
+      new Iterator[Identifier] {
+        def hasNext = rs.next()
+        def next = Identifier.of(namespace, rs.getString("TABLE_NAME"))
+      }.toArray
+    }
+  }
+
+  override def tableExists(ident: Identifier): Boolean = {
+    checkNamespace(ident.namespace())
+    val writeOptions = new JdbcOptionsInWrite(
+      options.parameters + (JDBCOptions.JDBC_TABLE_NAME -> getTableName(ident)))
+    withConnection(JdbcUtils.tableExists(_, writeOptions))
+  }
+
+  override def dropTable(ident: Identifier): Boolean = {
+    checkNamespace(ident.namespace())
+    withConnection { conn =>
+      try {
+        JdbcUtils.dropTable(conn, getTableName(ident), options)
+        true
+      } catch {
+        case _: SQLException => false
+      }
+    }
+  }
+
+  override def renameTable(oldIdent: Identifier, newIdent: Identifier): Unit = {
+    checkNamespace(oldIdent.namespace())
+    withConnection { conn =>
+      JdbcUtils.renameTable(conn, getTableName(oldIdent), getTableName(newIdent), options)
+    }
+  }
+
+  override def loadTable(ident: Identifier): Table = {
+    checkNamespace(ident.namespace())
+    val optionsWithTableName = new JDBCOptions(
+      options.parameters + (JDBCOptions.JDBC_TABLE_NAME -> getTableName(ident)))
+    try {
+      val schema = JDBCRDD.resolveTable(optionsWithTableName)
+      JDBCTable(ident, schema, optionsWithTableName)
+    } catch {
+      case _: SQLException => throw new NoSuchTableException(ident)
+    }
+  }
+
+  override def createTable(
+      ident: Identifier,
+      schema: StructType,
+      partitions: Array[Transform],
+      properties: java.util.Map[String, String]): Table = {
+      checkNamespace(ident.namespace())

Review comment:
       nit: wrong indentation.




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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663423508


   LGTM except some mior 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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662077929


   **[Test build #126275 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126275/testReport)** for PR 29168 at commit [`6669587`](https://github.com/apache/spark/commit/66695879ed355f602373f0166540ddbeda195ca1).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-661516112






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662092672






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663628861


   **[Test build #126499 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126499/testReport)** for PR 29168 at commit [`9b7aa8d`](https://github.com/apache/spark/commit/9b7aa8d0fbc79897fa652fa7b5faf0b9d076692f).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662663050






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662092125


   **[Test build #126276 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126276/testReport)** for PR 29168 at commit [`c509d74`](https://github.com/apache/spark/commit/c509d74e09628dd0ea668d2cf6b22e69aa3eb899).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663493700


   **[Test build #126499 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126499/testReport)** for PR 29168 at commit [`9b7aa8d`](https://github.com/apache/spark/commit/9b7aa8d0fbc79897fa652fa7b5faf0b9d076692f).


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662663050






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662955083






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] MaxGekk commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-663367114


   @cloud-fan Please, take a look at this.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] cloud-fan closed pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #29168:
URL: https://github.com/apache/spark/pull/29168


   


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662192212






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [WIP][SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662191188


   **[Test build #126275 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126275/testReport)** for PR 29168 at commit [`6669587`](https://github.com/apache/spark/commit/66695879ed355f602373f0166540ddbeda195ca1).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662932422


   **[Test build #126398 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/126398/testReport)** for PR 29168 at commit [`56b3329`](https://github.com/apache/spark/commit/56b3329b86a53723e4a9be5df9f0501811b6c4eb).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #29168: [SPARK-32375][SQL] Basic functionality of table catalog v2 for JDBC

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #29168:
URL: https://github.com/apache/spark/pull/29168#issuecomment-662955083






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

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



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org