[ 
https://issues.apache.org/jira/browse/CALCITE-5760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17729903#comment-17729903
 ] 

Tanner Clary commented on CALCITE-5760:
---------------------------------------

[~mbudiu] Additionally, I have worked quite a bit with the DATE/TIME functions 
so if you end up opening a PR for the millenium issue, feel free to tag me as a 
reviewer and I will try to take a look. Thanks.

> SqlOperatorTest::testDateTrunc does not validate results
> --------------------------------------------------------
>
>                 Key: CALCITE-5760
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5760
>             Project: Calcite
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 1.34.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>
> I was trying to reproduce a bug where DATE_TRUNC returns an incorrect result 
> when truncating a constant date to a MILLENNIUM.
> I found test cases for DATE_TRUNC in SqlOperatorTest; these test cases do 
> specify the expected result, e.g.:
> f.checkScalar("date_trunc(date '2015-02-19', isoyear)",
>         "2014-12-29", "DATE NOT NULL");
> However, the test fixture uses AbstractSqlTester::check, which ignores the 
> result!
> As a proof, one can replace the results with arbitrary strings and the tests 
> will still pass.
> I presume that this is not the intent of the test writers. How could this 
> test be fixed to also check the results?
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to