[
https://issues.apache.org/jira/browse/IMPALA-14192?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17986899#comment-17986899
]
weihua zhang commented on IMPALA-14192:
---------------------------------------
Given the implementation in
https://github.com/apache/calcite/blob/a6973bde8107a7c2a605a82c779a64fe28bdb5d1/core/src/main/java/org/apache/calcite/sql/fun/SqlLibraryOperators.java#L1153,
I added the following code to the lookupOperatorOverloads() method in
java/calcite-planner/src/main/java/org/apache/impala/calcite/operators/ImpalaOperatorTable.java:
{code:java}
final List<SqlLibrary> libraryList =
SqlLibrary.expand(Collections.singletonList(SqlLibrary.POSTGRESQL));
final SqlOperatorTable pgOperatorTable =
SqlLibraryOperatorTableFactory.INSTANCE.getOperatorTable(libraryList);
pgOperatorTable.lookupOperatorOverloads(opName, category, syntax,
operatorList, nameMatcher);
{code}
> SqlValidatorException: Invalid number of arguments to function 'ILIKE'. Was
> expecting 0 arguments
> -------------------------------------------------------------------------------------------------
>
> Key: IMPALA-14192
> URL: https://issues.apache.org/jira/browse/IMPALA-14192
> Project: IMPALA
> Issue Type: Sub-task
> Reporter: weihua zhang
> Priority: Major
>
> {code:sql}
> SELECT 'huahua' ILIKE '%han%'
> 2025-06-27 03:57:08 [Exception] ERROR: Query
> 524963f4bf25a562:c84ba73900000000 failed:
> AnalysisException: From line 1, column 8 to line 1, column 31: Invalid number
> of arguments to function 'ILIKE'. Was expecting 0 arguments
> CAUSED BY: SqlValidatorException: Invalid number of arguments to function
> 'ILIKE'. Was expecting 0 arguments
> SELECT 'huahua' not ILIKE '%han%';
> AnalysisException: From line 1, column 8 to line 1, column 34: No match found
> for function signature NOT ILIKE
> CAUSED BY: SqlValidatorException: No match found for function signature NOT
> ILIKE
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]