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

Jiatao Tao commented on CALCITE-3065:
-------------------------------------

Hi [~danny0405] [~julianhyde]

code like this 

 
{code:java}
val tp = new JavaTypeFactoryImpl(RelDataTypeSystem.DEFAULT)
literal.getValueAs(tp.getJavaClass(literal.getType).asInstanceOf[java.lang.Class[_]])
{code}
 

And `tp.getJavaClass(literal.getType)` return int not Interger, and getValueAs 
can not recognize int, so I open this jira.

 

And Primitive.box(clazz) do work, but in my opinion, leave this to callee is 
more elegant, maybe we can do this in method "getValueAs".

 

And do appreciate for your reply, hope to hear your opinion again.

 

> 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