You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2016/04/26 00:23:12 UTC

[jira] [Closed] (CALCITE-1176) The implementation of SqlOperatorBinding#getOperandLiteralValue does not strictly follow the contract

     [ https://issues.apache.org/jira/browse/CALCITE-1176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sean Hsuan-Yi Chu closed CALCITE-1176.
--------------------------------------
    Resolution: Not A Problem

> The implementation of SqlOperatorBinding#getOperandLiteralValue does not strictly follow the contract
> -----------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-1176
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1176
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Sean Hsuan-Yi Chu
>            Assignee: Sean Hsuan-Yi Chu
>
> As is pointed out in [1], if the operand is not a literal, the value returned by SqlOperatorBinding#getOperandLiteralValue is null.
> However, the two implementations in RexCallBinding and SqlCallBinding do not really follow. From the implementation point of view, they will call other two utilities methods which could throw exceptions [2], [3]. 
> [1] https://github.com/apache/calcite/blob/4c7f5c20a04b4a4e736a16f801d8b5e6eded48cc/core/src/main/java/org/apache/calcite/sql/SqlOperatorBinding.java#L119
> [2] 
> https://github.com/apache/calcite/blob/72b2cfb799242e0d1d7e6aed8bfe43cceb554c7c/core/src/main/java/org/apache/calcite/rex/RexLiteral.java#L645
> [3]
> https://github.com/apache/calcite/blob/4ac82a30b8ee7ae1afcd83c6f3ef687761536f2e/core/src/main/java/org/apache/calcite/sql/SqlLiteral.java#L335



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)