[
https://issues.apache.org/jira/browse/CALCITE-6791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914828#comment-17914828
]
ZheHu commented on CALCITE-6791:
--------------------------------
I think there might be two ways to solve this and not sure which one is better.
# Add REPLACE function in Parser.jj, so we can distinguish REPLACE in
SqlStdOperatorTable from what in SqlLibraryOperators(call it REPLACE_MSSQL)
based on conformance. Like [what
|https://issues.apache.org/jira/projects/CALCITE/issues/CALCITE-6730] we do for
CONVERT and CONVERT_ORACLE.
# Move REPLACE from SqlStdOperatorTable to SqlLibraryOperators since it's not a
standard function, however this may cause imcompatiable problem with out former
version.
> Search pattern during matching in REPLACE function should be case insensitive
> in MSSQL
> --------------------------------------------------------------------------------------
>
> Key: CALCITE-6791
> URL: https://issues.apache.org/jira/browse/CALCITE-6791
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.38.0
> Reporter: ZheHu
> Assignee: ZheHu
> Priority: Major
>
> REPLACE function in Microsoft SQL Server is case insensitive when matching
> the search pattern.
> Result for the following query is "ciciaociaoo"
> {code:java}
> replace('ciAao', 'a', 'ciao')
> {code}
> Same query in Oracle or PostgreSQL results in "ciAciaoo".
> For this case, we should add a function(call it REPLACE_MSSQL) and enable it
> when fun=mssql.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)