cxzl25 commented on code in PR #5022:
URL: https://github.com/apache/kyuubi/pull/5022#discussion_r1254287556


##########
extensions/spark/kyuubi-spark-connector-hive/src/main/scala/org/apache/kyuubi/spark/connector/hive/HiveTableCatalog.scala:
##########
@@ -410,6 +416,61 @@ private object HiveTableCatalog {
         Seq(SupportsNamespaces.PROP_COMMENT, SupportsNamespaces.PROP_LOCATION))
   }
 
+  private def getStorageFormatAndProvider(
+      provider: Option[String],
+      maybeStoredAs: Option[String],
+      location: Option[String],
+      options: Map[String, String]): (CatalogStorageFormat, String) = {
+    val nonHiveStorageFormat = CatalogStorageFormat.empty.copy(
+      locationUri = location.map(CatalogUtils.stringToURI),
+      properties = options)
+
+    val conf = SQLConf.get
+    val defaultHiveStorage = HiveSerDe.getDefaultStorage(conf).copy(
+      locationUri = location.map(CatalogUtils.stringToURI),
+      properties = options)
+
+    if (provider.isDefined) {
+      (nonHiveStorageFormat, provider.get)
+    } else if (maybeStoredAs.isDefined) {
+      val maybeSerde = options.get("hive.serde")
+      val maybeInputFormat = options.get("hive.input-format")
+      val maybeOutputFormat = options.get("hive.output-format")
+      val storageFormat = if (maybeStoredAs.isDefined) {

Review Comment:
   `maybeStoredAs.isDefined` should always be true here, as it was checked 
earlier.



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