File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
catalyst/src/main/scala/org/apache/spark/sql/connector/catalog
core/src/main/scala/org/apache/spark/sql/execution/datasources/v2 Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -334,15 +334,17 @@ private[sql] object CatalogV2Util {
334334 private def convertToProperties (serdeInfo : Option [SerdeInfo ]): Map [String , String ] = {
335335 serdeInfo match {
336336 case Some (s) =>
337- (s.formatClasses match {
337+ (( s.formatClasses match {
338338 case Some ((inputFormat, outputFormat)) =>
339339 Map (" hive.input-format" -> inputFormat, " hive.output-format" -> outputFormat)
340340 case _ =>
341341 Map .empty
342342 }) ++
343- s.storedAs.map(" hive.stored-as" -> _).toMap ++
344- s.serde.map(" hive.serde" -> _).toMap ++
345- s.serdeProperties.map { case (key, value) => TableCatalog .OPTION_PREFIX + key -> value }
343+ s.storedAs.map(" hive.stored-as" -> _) ++
344+ s.serde.map(" hive.serde" -> _) ++
345+ s.serdeProperties.map {
346+ case (key, value) => TableCatalog .OPTION_PREFIX + key -> value
347+ }).toMap
346348 case None =>
347349 Map .empty
348350 }
Original file line number Diff line number Diff line change @@ -114,7 +114,9 @@ class V2SessionCatalog(catalog: SessionCatalog)
114114 private def toOptions (properties : Map [String , String ]): Map [String , String ] = {
115115 properties
116116 .filterKeys(_.startsWith(TableCatalog .OPTION_PREFIX ))
117- .map { case (key, value) => key.replaceFirst(TableCatalog .OPTION_PREFIX , " " ) -> value }
117+ .map {
118+ case (key, value) => key.replaceFirst(TableCatalog .OPTION_PREFIX , " " ) -> value
119+ }.toMap
118120 }
119121
120122 override def alterTable (
You can’t perform that action at this time.
0 commit comments