nsivabalan opened a new issue, #17479:
URL: https://github.com/apache/hudi/issues/17479

   ### Bug Description
   
   **What happened:**
   say we create an expression index as below
   ```
   create index idx_datestr on tableName using column_stats(ts) 
options(expr='from_unixtime', format='yyyy-MM-dd HH:mm')
   ```
   
   And the expectation is that, if a query with predicate "where 
from_unixtime(ts, 'yyyy-MM-dd') = '1970-01-01'" is supplied, expression index 
will be used.
   Eg query: 
   ```
   select id, name from tableName where from_unixtime(ts, 'yyyy-MM-dd') = 
'1970-01-01'
   ```
   
   But if the query contains the data column directly, we should not be looking 
up in expression index for pruning, but such query are looking up in expression 
index and hits exception due to casting issue. But we swallow the failure 
silently and move on to next index. 
   
   <img width="1472" height="364" alt="Image" 
src="https://github.com/user-attachments/assets/69be0299-940b-4c74-a8a7-098127646218";
 />
   
   
   **What you expected:**
   Only when the expression matches, we should lookup in expression index, if 
not, we should fallback to other indices available.
   
   **Steps to reproduce:**
   1. 
   2.
   3.
   
   
   ### Environment
   
   **Hudi version:**
   **Query engine:** (Spark/Flink/Trino etc)
   **Relevant configs:**
   
   
   ### Logs and Stack Trace
   
   _No response_


-- 
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]

Reply via email to