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/03/14 02:25:47 UTC

[GitHub] [spark] nchammas commented on a change in pull request #27908: [SPARK-31000] Add ability to set table description via Catalog.createTable()

nchammas commented on a change in pull request #27908: [SPARK-31000] Add ability to set table description via Catalog.createTable()
URL: https://github.com/apache/spark/pull/27908#discussion_r392548582
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/CachedTableSuite.scala
 ##########
 @@ -1026,10 +1026,10 @@ class CachedTableSuite extends QueryTest with SQLTestUtils
         withTable(s"$db.cachedTable") {
           // Create table 'cachedTable' in temp db for testing purpose.
           spark.catalog.createTable(
-            s"$db.cachedTable",
-            "PARQUET",
-            StructType(Array(StructField("key", StringType))),
-            Map("LOCATION" -> path.toURI.toString))
+            tableName = s"$db.cachedTable",
+            source = "PARQUET",
+            schema = StructType(Array(StructField("key", StringType))),
+            options = Map("LOCATION" -> path.toURI.toString))
 
 
 Review comment:
   I had to make these changes so that the correct method would be invoked. I'm not fluent in Scala, but at least in Python I'd consider this style to also be better form since explicitly naming the parameters eliminates ambiguity.
   
   Would this be considered an API breaking change, though? Since folks who are using the method with unnamed parameters will have trouble once `description` gets added in.
   
   If so, would the solution be to move `description` to the end of the parameter list?

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


With regards,
Apache Git Services

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