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

Danny Chan commented on CALCITE-3065:
-------------------------------------

[~Aron.tao] While i checked the usage of method *SqlLiteral#getValueAs* and 
*SqlCallBinding#getOperandLiteralValue*, we never passed in a primitive java 
class as argument in current Calcite codebase.

So i'm wondering why you need a code snippet like that ? Maybe you should just 
fetch and match the SqlTypeName [1] for the literal and passed in a Boxed type 
class to *SqlLiteral#getValueAs* explicitly.

 

[1] 
[https://github.com/apache/calcite/blob/e98c779d1ec0bc87c81a72b974c89a41a7222a07/core/src/main/java/org/apache/calcite/sql/SqlLiteral.java#L152]

> RexLiteral#getValueAs should consider primitive type
> ----------------------------------------------------
>
>                 Key: CALCITE-3065
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3065
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jiatao Tao
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: image-2019-05-13-12-04-36-365.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> !image-2019-05-13-12-04-36-365.png!



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

Reply via email to