DominicRicardAdgear opened a new issue, #17174:
URL: https://github.com/apache/druid/issues/17174

   ### Affected Version
   
   Druid V.30.0.0
   ### Description
   
   Running the following query yields an error:
   ```
   with t as (select 'a string' as col) 
   select 
     col, 
     upper(col)
   from t
   where 
   UPPER(t.col) LIKE UPPER('a%')
   ```
   
   Result:
   ```
   Error: UNCATEGORIZED (ADMIN)
   
   Function[like] pattern argument must be a literal
   ```
   
   Running the same comparator against a table does not result in an error. 
When doing `explain plan for` on the table query, the filter value is shown as 
being uppercased, which suggest druid is executing the UPPER function before 
building the plan. 
   
   ```
   explain plan for select count(1) from INFORMATION_SCHEMA.TABLES where 
upper(TABLE_NAME) like upper('%a%')
   ```
   Result:
   ```
   BindableAggregate(group=[{}], EXPR$0=[COUNT()])
     BindableFilter(condition=[LIKE(UPPER($2), '%A%')])
       BindableTableScan(table=[[INFORMATION_SCHEMA, TABLES]])
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to