Attila Jeges has posted comments on this change. ( http://gerrit.cloudera.org:8080/14291 )
Change subject: IMPALA-8704: ISO:SQL:2016 datetime patterns - Milestone 2 ...................................................................... Patch Set 7: (5 comments) http://gerrit.cloudera.org:8080/#/c/14291/7/tests/query_test/test_cast_with_format.py File tests/query_test/test_cast_with_format.py: http://gerrit.cloudera.org:8080/#/c/14291/7/tests/query_test/test_cast_with_format.py@782 PS7, Line 782: # Strict separator matching. : result = self.client.execute("select cast('2001-03-02 03:10:15' as timestamp format" : "'FXYYYY MM-DD HH12:MI:SS')") : assert result.data == ["NULL"] : : result = self.client.execute("select cast('2001-03-03 03:10:15' as timestamp format" : "'FXYYYY-MM-DD HH12::MI:SS')") : assert result.data == ["NULL"] : : result = self.client.execute("select cast('2001-03-04 ' as timestamp format" : "'FXYYYY-MM-DD ')") : assert result.data == ["NULL"] : : # Strict token length matching. : result = self.client.execute("select cast('2001-3-05' as timestamp format " : "'FXYYYY-MM-DD')") : assert result.data == ["NULL"] Maybe add positive tests too for these. e.g after L783: select cast('2001 03-02 03:10:15' as timestamp format 'FXYYYY MM-DD HH12:MI:SS') http://gerrit.cloudera.org:8080/#/c/14291/7/tests/query_test/test_cast_with_format.py@866 PS7, Line 866: doesn't don't http://gerrit.cloudera.org:8080/#/c/14291/7/tests/query_test/test_cast_with_format.py@872 PS7, Line 872: result = self.client.execute("select cast(cast('2001-03-09' as date) " : "as string format 'YYYY-FMMM-FMDD')") : assert result.data == ["2001-3-9"] Maybe add a test were year token is FM-modified e.g.: select cast(date'0001-03-09' as string format 'FMYYYY-FMMM-FMDD') select cast(date'0001-03-09' as string format 'FMYY-FMMM-FMDD') http://gerrit.cloudera.org:8080/#/c/14291/7/tests/query_test/test_cast_with_format.py@882 PS7, Line 882: result = self.client.execute("select cast(cast('2001-04-09' as date) " : "as string format 'FXYYYY-FMMM-FMDD')") Test FM-modified year token here too. http://gerrit.cloudera.org:8080/#/c/14291/7/tests/query_test/test_cast_with_format.py@1045 PS7, Line 1045: "select cast('1985-11-21text' as timestamp format 'YYYY-MM-DD\"text')" Again, please use raw python strings, here and below. -- To view, visit http://gerrit.cloudera.org:8080/14291 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I30d2f6656054371476aaa8bd0d51f572b9369855 Gerrit-Change-Number: 14291 Gerrit-PatchSet: 7 Gerrit-Owner: Gabor Kaszab <gaborkas...@cloudera.com> Gerrit-Reviewer: Attila Jeges <atti...@cloudera.com> Gerrit-Reviewer: Gabor Kaszab <gaborkas...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Comment-Date: Wed, 16 Oct 2019 09:47:34 +0000 Gerrit-HasComments: Yes