[
https://issues.apache.org/jira/browse/CALCITE-7287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18037695#comment-18037695
]
Yu Xu commented on CALCITE-7287:
--------------------------------
I took a look at it. It only simplifies the String format here and does not
change the previous return type. The problem you describe may have nothing to
do with the simplification of the string here.
You can refer to the way of writing tests in PR. It is best to reproduce your
problem, otherwise still hard to fully understand your scenario.
> In simplifyLike, the makeLiteral call does not preserve the RelDataType
> -----------------------------------------------------------------------
>
> Key: CALCITE-7287
> URL: https://issues.apache.org/jira/browse/CALCITE-7287
> Project: Calcite
> Issue Type: Bug
> Affects Versions: 1.41.0
> Reporter: Steve Carlin
> Priority: Major
>
> In my Calcite code, I have a RexLiteral that is of type RelDataType.VARCHAR
> (the SqlTypeName is always CHAR)
> However, this information is getting lost in the call here
> [https://github.com/apache/calcite/blob/main/core/src/main/java/org/apache/calcite/rex/RexSimplify.java#L527]
> The result of this simplification gives me a RelDataType.CHAR instead.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)