You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Liya Fan (Jira)" <ji...@apache.org> on 2021/02/26 10:07:00 UTC
[jira] [Commented] (CALCITE-4510) RexLiteral can produce wrong
digest for some user defined types
[ https://issues.apache.org/jira/browse/CALCITE-4510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17291528#comment-17291528 ]
Liya Fan commented on CALCITE-4510:
-----------------------------------
[~rubenql] It sounds much better than my original title. Thanks for the good suggestion.
I have updated the Jira title and commit message accordingly.
Sorry for my poor English. ;)
> RexLiteral can produce wrong digest for some user defined types
> ---------------------------------------------------------------
>
> Key: CALCITE-4510
> URL: https://issues.apache.org/jira/browse/CALCITE-4510
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Liya Fan
> Assignee: Liya Fan
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> We find weird literals for some user defined non-nullable types. Some investigation shows that the problem lies in the {{RexLiteral#toJavaString}} method.
> In particular, it checks the type string suffix with an 8-character string:
> {noformat}
> if (!fullTypeString.endsWith("NOT NULL")) {
> {noformat}
> However, it trims the last 9 characters from the end of the string:
> {noformat}
> sb.append(fullTypeString, 0, fullTypeString.length() - 9);
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)