pan3793 commented on code in PR #7399:
URL: https://github.com/apache/kyuubi/pull/7399#discussion_r3070591115


##########
extensions/spark/kyuubi-spark-connector-hive/src/main/scala/org/apache/kyuubi/spark/connector/hive/HiveTableCatalog.scala:
##########
@@ -431,10 +434,25 @@ class HiveTableCatalog(sparkSession: SparkSession)
       catalog.renameTable(oldIdent.asTableIdentifier, 
newIdent.asTableIdentifier)
     }
 
-  private def toOptions(properties: Map[String, String]): Map[String, String] 
= {
-    properties.filterKeys(_.startsWith(TableCatalog.OPTION_PREFIX)).map {
-      case (key, value) => key.drop(TableCatalog.OPTION_PREFIX.length) -> value
-    }.toMap
+  /**
+   * Splits properties into optionsProps and serdeProps based on the 
`options.` prefix.
+   *
+   * - optionsProps: keys with "options." prefix whose stripped key ALREADY 
exist in properties,
+   *   indicating they were originally specified via OPTIONS clause.
+   * - serdeProps: keys with "options." prefix whose stripped key does NOT 
exists in properties,
+   *   indicating they were originally specified via SERDEPROPERTIES clause
+   *
+   * @param properties the full properties map
+   * @return a tuple of (optionsProps, serdeProps), both with the "options." 
prefix stripped
+   */
+  private def toOptionsAndSerdeProps(

Review Comment:
   let's add a UT for this method



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