You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "gengliangwang (via GitHub)" <gi...@apache.org> on 2023/02/02 20:54:07 UTC

[GitHub] [spark] gengliangwang commented on a diff in pull request #39863: [SPARK-42294][SQL] Include column default values in DESCRIBE output for V2 tables

gengliangwang commented on code in PR #39863:
URL: https://github.com/apache/spark/pull/39863#discussion_r1095075995


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/v2/DescribeTableExec.scala:
##########
@@ -68,6 +69,16 @@ case class DescribeTableExec(
         case (key, value) => key + "=" + value
       }.mkString("[", ",", "]")
     rows += toCatalystRow("Table Properties", properties, "")
+
+    // If any columns have default values, append them to the result.
+    if (table.schema.fields.exists(_.metadata.contains(CURRENT_DEFAULT_COLUMN_METADATA_KEY))) {

Review Comment:
   This seesm duplicated with https://github.com/apache/spark/pull/39726/files#diff-632efff0ffceb2ff47b97f39570b4f2cff24401f132f559158acaa651b27af26R651. Shall we abstract them?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org