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

Julian Hyde edited comment on CALCITE-3426 at 10/21/19 1:53 AM:
----------------------------------------------------------------

Not sure what "compensate" means. Can you improve the description.

As [~danny0405] notes, this method is currently only called in tests. If it 
were called from {{RexLiteral}}'s constructor, or from {{valueMatchesType}}, it 
would be more trustworthy. There would be some performance impact, but probably 
OK.

Alternatively, write a test that calls both {{validConstant}} and 
{{valueMatchesType}}, in both positive and negative tests, and check that they 
always agree. Which is what the contract of {{validConstant}} promises, after 
all.


was (Author: julianhyde):
Not sure what "compensate" means. Can you improve the description.

As [~danny0405] notes, this method is currently only called in tests. If it 
were called from RexLiteral's constructor, or from valueMatchesType, it would 
be more trustworthy.

> compensate validConstant type in RexLiteral.
> --------------------------------------------
>
>                 Key: CALCITE-3426
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3426
>             Project: Calcite
>          Issue Type: Wish
>            Reporter: xzh_dz
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> compensate validConstant type in RexLiteral.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to