yaooqinn commented on a change in pull request #29220:
URL: https://github.com/apache/spark/pull/29220#discussion_r460670176



##########
File path: sql/core/src/test/resources/sql-tests/inputs/datetime-parsing.sql
##########
@@ -1,5 +1,33 @@
 --- TESTS FOR DATETIME PARSING FUNCTIONS ---
 
+-- parsing with pattern 'y'.
+-- the range of valid year is [1, 294247],
+-- but particularly, some thrift client use java.sql.Timestamp to parse 
timestamp, which allows
+-- only year values less or equal than 9999. So the cases bellow only use 9999 
at most to pass
+-- ThriftServerQueryTestSuite
+select to_timestamp('1', 'y');
+select to_timestamp('009999', 'y');
+
+-- reduced two digit form is used, the range of valid year is 20-[01, 99]
+select to_timestamp('00', 'yy');
+select to_timestamp('99', 'yy');
+
+-- the range of valid year is [1, 294247], the field width padding to the 
range [3, 6]
+select to_timestamp('001', 'yyy');

Review comment:
       yes, that' right. I will fix this.
   




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



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

Reply via email to