tagatac commented on code in PR #54467:
URL: https://github.com/apache/spark/pull/54467#discussion_r2854670084


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala:
##########
@@ -146,7 +146,9 @@ case class CatalogStorageFormat(
     outputFormat: Option[String],
     serde: Option[String],
     compressed: Boolean,
-    properties: Map[String, String]) extends MetadataMapSupport {
+    properties: Map[String, String],
+    serdeName: Option[String] = None)
+    extends MetadataMapSupport {

Review Comment:
   I did consider this. It affects 15 more call sites, mostly tests:
   ```
   ❯❯❯ git --no-pager show -- 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala
 | grep -C 2 'serdeName:'
        inputFormat: Option[String],
        outputFormat: Option[String],
   +    serdeName: Option[String],
        serde: Option[String],
        compressed: Boolean,
   --
          outputFormat: Option[String] = storage.outputFormat,
          compressed: Boolean = false,
   +      serdeName: Option[String] = storage.serdeName,
          serde: Option[String] = storage.serde,
          properties: Map[String, String] = storage.properties): CatalogTable = 
{
   ❯❯❯ git --no-pager show --stat
   ...
    
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala
            |  7 +++++--
    
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalogSuite.scala
 |  7 ++++---
    
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala   
             |  2 +-
    sql/core/src/test/scala/org/apache/spark/sql/sources/InsertSuite.scala      
                 |  1 +
    
sql/hive/src/main/scala/org/apache/spark/sql/hive/client/HiveClientImpl.scala   
             | 11 +++++++++++
    
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveMetastoreCatalogSuite.scala
            | 18 ++++++++++++++++++
    
sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveSchemaInferenceSuite.scala
             |  2 ++
    
sql/hive/src/test/scala/org/apache/spark/sql/hive/MetastoreDataSourcesSuite.scala
            |  1 +
    
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HiveClientSuite.scala  
             |  3 +++
    
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HivePartitionFilteringSuite.scala
   |  1 +
    
sql/hive/src/test/scala/org/apache/spark/sql/hive/client/HivePartitionLocationSuite.scala
    |  1 +
    
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala  
             |  2 ++
    12 files changed, 50 insertions(+), 6 deletions(-)
   ```
   I am happy to make this change if it's preferred.
   
   WRT `extends MetadataMapSupport`, per the [Contributing 
guidance](https://spark.apache.org/contributing.html) "Code style guide" 
section, I ran `dev/scalafmt` to get that formatting, but I now see that it 
does not match the [Databricks style 
guide](https://github.com/databricks/scala-style-guide?tab=readme-ov-file#spacing-and-indentation)
 (4 space indent should be 2). I will revert it to the original style before 
this PR.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to