dongjoon-hyun commented on a change in pull request #27902: [SPARK-31147][SQL] 
forbid CHAR/VARCHAR type in non-Hive tables
URL: https://github.com/apache/spark/pull/27902#discussion_r392324949
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/connector/catalog/CatalogV2Util.scala
 ##########
 @@ -329,4 +330,18 @@ private[sql] object CatalogV2Util {
       .getOrElse(catalogManager.v2SessionCatalog)
       .asTableCatalog
   }
+
+  def failCharType(dt: DataType): Unit = {
+    if (HiveStringType.containsCharType(dt)) {
+      throw new AnalysisException("Cannot use CHAR/VARCHAR type in non-Hive 
tables.")
 
 Review comment:
   Shall we have a directional warning like `Use STRING type instead of 
CHAR/VARCHAR type in non-Hive tables.`?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to