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

Vladimir Sitnikov edited comment on CALCITE-2535 at 9/11/18 7:04 AM:
---------------------------------------------------------------------

Oh, I think I know an example:
{code:sql}
select coalesce(case when count(*)>0 then 1 else null end, 0/0) from 
values(1){code}
The idea is as follows: during regular execution, 0/0 will never be reached.
 However constant-folder might be too eager to constant-fold "0/0" computation 
making the SQL to fail.


was (Author: vladimirsitnikov):
Oh, I think I know an example:

{code:sql}select coalesce(case when count(*)>0 then 1 else null end, 0/0) from 
values(1){code}

Not sure what to put instead of ..., but the idea is as follows:  during 
regular execution, 0/0 will never be reached.
However constant-folder might be too eager to constant-fold "0/0" computation 
making the SQL to fail.

> Runtime failure check not working in SqlTesterImpl.java
> -------------------------------------------------------
>
>                 Key: CALCITE-2535
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2535
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Hongze Zhang
>            Assignee: Julian Hyde
>            Priority: Major
>
> Problem at SqlTesterImpl#checkFails:
> When argument "runtime" is specified as true, error assertion and error 
> message matching will not be performed.
> This issue could result in wrong test result in SqlOperatorBaseTest.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to