yaooqinn commented on a change in pull request #26418: [SPARK-29783][SQL] 
Support SQL Standard output style for interval type
URL: https://github.com/apache/spark/pull/26418#discussion_r344174342
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
 ##########
 @@ -1774,6 +1773,19 @@ object SQLConf {
     .booleanConf
     .createWithDefault(false)
 
+  object IntervalStyle extends Enumeration {
+    val SQL_STANDARD, MULTI_UNITS = Value
+  }
+
+  val INTERVAL_STYLE = buildConf("spark.sql.IntervalOutputStyle")
+    .doc("Display format for interval values. The value SQL_STANDARD will 
produce output" +
+      " matching SQL standard interval literals. The value MULTI_UNITS (which 
is the default)" +
+      " will produce output in form of value unit pairs, i.e. '3 year 2 months 
10 days'")
+    .stringConf
+    .transform(_.toUpperCase(Locale.ROOT))
+    .checkValues(IntervalStyle.values.map(_.toString))
+    .createWithDefault(IntervalStyle.MULTI_UNITS.toString)
 
 Review comment:
   yes, I guess some users may already rely on the output string

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to