You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "panbingkun (via GitHub)" <gi...@apache.org> on 2024/03/22 02:01:54 UTC

Re: [PR] [MINOR][SQL][TESTS] Add a test coverage for createTable method (partitioned-table) in CatalogSuite [spark]

panbingkun commented on code in PR #45637:
URL: https://github.com/apache/spark/pull/45637#discussion_r1534946158


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/connector/catalog/CatalogSuite.scala:
##########
@@ -111,6 +111,29 @@ class CatalogSuite extends SparkFunSuite {
     assert(catalog.tableExists(testIdent))
   }
 
+  test("createTable: partitioned table") {
+    val partCatalog = new InMemoryPartitionTableCatalog
+    partCatalog.initialize("test", CaseInsensitiveStringMap.empty())
+
+    assert(!partCatalog.tableExists(testIdent))
+
+    val columns = Array(
+        Column.create("col0", IntegerType),
+        Column.create("part0", IntegerType))
+    val table = partCatalog.createTable(

Review Comment:
   Yeah, that's what it means.
   The original intention was that a colleague asked me yesterday how to create `a partitioned table` using `TableCatalog#createTable`.  I reviewed the code and found that this explicit usage method was missing from the UT.
   Because the concept of `Transform` is very obscure, it is not easy for `new guys` to understand how to use 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.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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