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

krooswu commented on CALCITE-7700:
----------------------------------

yeah, I'll keep {{SqlTypeFamily.STRING}} as is for this ticket. This fix 
targets a bug in {{CompositeOperandTypeChecker#getAllowedSignatures}} — for 
AND-composed checkers like {{{}STRING_SAME_SAME{}}}, it only surfaces the first 
rule's signature and drops the {{SAME_SAME}} constraint, which is what makes 
the error message misleading. Renaming the family is a separate, larger 
discussion I'd leave for its own JIRA.

> Error messages involving the STRING type family are confusing
> -------------------------------------------------------------
>
>                 Key: CALCITE-7700
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7700
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Mihai Budiu
>            Assignee: krooswu
>            Priority: Minor
>
> The STRING type family includes both STRING and BINARY types.
> This produces confusing errors for functions that may support both types of 
> arguments:
> {code:sql}
> SELECT CONCAT('a', x'0a');
> {code}
> produces
> {noformat}
> Cannot apply 'CONCAT' to arguments of type 'CONCAT(<CHAR(1)>, <BINARY(1)>)'.
> Supported form(s): 'CONCAT(<STRING>, <STRING>)'
> {noformat}
> But CONCAT does support BINARY arguments!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to