dtenedor commented on code in PR #36745:
URL: https://github.com/apache/spark/pull/36745#discussion_r888505435


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/ResolveDefaultColumnsUtil.scala:
##########
@@ -231,4 +232,18 @@ object ResolveDefaultColumns {
       }
     }
   }
+
+  def checkDataSourceSupportsDefaultColumns(table: CatalogTable): Unit = {
+    if (table.schema.fields.map(_.metadata).exists { m =>
+      m.contains(CURRENT_DEFAULT_COLUMN_METADATA_KEY) ||
+        m.contains(EXISTS_DEFAULT_COLUMN_METADATA_KEY)
+    }) {
+      table.provider.getOrElse("").toLowerCase() match {
+        case "csv" | "json" | "parquet" | "orc" =>

Review Comment:
   Good ideas! I made this a configuration option. It does support DataSource 
V2, I added a couple more tests to show that.



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