Skip to content

Commit 621a00e

Browse files
committed
address comments
1 parent b3b5ee4 commit 621a00e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/sql-ref-datetime-pattern.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ The count of pattern letters determines the format.
193193

194194
- Number/Text: If the count of pattern letters is 3 or greater, use the Text rules above. Otherwise use the Number rules above.
195195

196-
- Fraction: Outputs the nano-of-second field as a fraction-of-second. The nano-of-second value has nine digits, thus the count of pattern letters is from 1 to 9. If it is less than 9, then the nano-of-second value is truncated, with only the most significant digits being output.
196+
- Fraction: Outputs the micro-of-second field as a fraction-of-second. The micro-of-second value has six digits, thus the count of pattern letters is from 1 to 6. If it is less than 6, then the micro-of-second value is truncated, with only the most significant digits being output.
197197

198198
- Year: The count of letters determines the minimum field width below which padding is used. If the count of letters is two, then a reduced two digit form is used. For printing, this outputs the rightmost two digits. For parsing, this will parse using the base value of 2000, resulting in a year within the range 2000 to 2099 inclusive. If the count of letters is less than four (but not two), then the sign is only output for negative years. Otherwise, the sign is output if the pad width is exceeded.
199199

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/util/DateTimeUtilsSuite.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ class DateTimeUtilsSuite extends SparkFunSuite with Matchers with SQLHelper {
663663
assert(convertIncompatiblePattern("yyyy-MM'u contains in quoted text'HH:mm:ss")
664664
=== "uuuu-MM'u contains in quoted text'HH:mm:ss")
665665
assert(convertIncompatiblePattern("yyyy-MM'u contains in quoted text'''''HH:mm:ss")
666-
=== "uuuu-MM'u contains in quoted text'HH:mm:ss")
666+
=== "uuuu-MM'u contains in quoted text'''''HH:mm:ss")
667+
assert(convertIncompatiblePattern("yyyy-MM-dd'T'HH:mm:ss.SSSz G")
668+
=== "yyyy-MM-dd'T'HH:mm:ss.SSSz G")
667669
}
668670
}

0 commit comments

Comments
 (0)