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

Dan Zou commented on CALCITE-5777:
----------------------------------

[~julianhyde] Thanks for your advice, I agree that it is more important to 
avoid similar problems in the future than simply fixing the current issue.

> Simplify 'OperandTypes.STRING.or(OperandTypes.BINARY)' to 
> 'OperandTypes.STRING'
> -------------------------------------------------------------------------------
>
>                 Key: CALCITE-5777
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5777
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Dan Zou
>            Assignee: Dan Zou
>            Priority: Major
>              Labels: pull-request-available
>
> We have used 'OperandTypes.STRING.or(OperandTypes.BINARY)' multiple times as 
> the SqlOperandTypeChecker in 'SqlLibraryOperators'. But this is not 
> reasonable, as the STRING family already contains BINARY family, which means 
> we could simplify 'OperandTypes.STRING.or(OperandTypes.BINARY)' to 
> 'OperandTypes.STRING'.
> {code:java}
>   // From 'SqlTypeName'
>   public static final List<SqlTypeName> STRING_TYPES =
>       combine(CHAR_TYPES, BINARY_TYPES);
> {code}



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

Reply via email to