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

Julian Hyde commented on CALCITE-4443:
--------------------------------------

It's always best to log a JIRA case before starting work on the code.

Here are some pointers:
* This is not standard. Therefore we do not want to enable it in the default 
dialect. (There are too many pattern-matching operators already: RLIKE, SIMILAR 
TO, LIKE_REGEX, Posix regex.)
* Normally we'd put library-specific functions in {{SqlLibraryOperators}} and 
enable using {{fun=oracle}} etc. in the JDBC URI; but because this is a binary 
operator, not a function, it requires parser changes, so it can't easily be 
enabled/disabled. I think you should add a conformance method 
{{isIlikeAllowed()}} similar to {{isBangEqualAllowed()}} (see how that is used 
in Parser.jj) to enable {{!=}}.
* Capitalize as one word: {{Ilike}}, not {{ILike}}}.
* Document the operator in reference.md along with the other dialect-specific 
operators such as {{CHR}}.
* Don't add new {{SqlKind}} values. In CALCITE-4415 we just *removed* NOT_LIKE 
(to ensure more consistent and powerful rewrites with less code). Maybe add a 
boolean field to {{SqlLikeOperator}} (so there will be 2 more instances of 
{{SqlLikeOperator}}).
* Add tests similar to {{RelToSqlConverterTest.testLike}} to make sure that we 
can generate SQL with {{ILIKE}} and {{NOT ILIKE}}.


> Add support for the ILIKE operator to core
> ------------------------------------------
>
>                 Key: CALCITE-4443
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4443
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Ondřej Štumpf
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Extend the list of supported relational operators in SqlStdOperatorTable with 
> ILIKE. The new ILIKE keyword should be unreserved and behave exactly like 
> LIKE, but without case-sensitivity.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to