[
https://issues.apache.org/jira/browse/CALCITE-3065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16840108#comment-16840108
]
Jiatao Tao commented on CALCITE-3065:
-------------------------------------
Hi [~danny0405]
Here I briefly describe how I encountered this problem.The literal I get is
from RexVisitor#visitLiteral, and calcite will treat all numeric as *decimal*,
and Spark will add cast in filter for that scenario. In some case, filter with
cast can not use the ability of pruning.
For "passed in a Boxed type class to *SqlLiteral#getValueAs* explicitly." , In
my opinion, leave this to callee is more elegan, why not "Primitive.box" class
first in *SqlLiteral#**getValueAs?* .
By the way, may I ask why Calcite treate all numeric as *decimal?*
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)