singhpk234 opened a new issue #3978:
URL: https://github.com/apache/iceberg/issues/3978


   Presently a query like this : 
   
   ``` SQL
   SELECT f.* FROM tableName f JOIN dim d ON f.Id = d.id AND f.Data = d.data 
AND d.date = DATE '1970-01-02'
   ```
   fails with
   >  org.apache.iceberg.exceptions.ValidationException: Cannot find field 'Id' 
in struct: struct<1: id: optional long, 2: data: optional string, 3: date: 
optional date, 4: ts: optional timestamptz>
   
   This happens because while creating inclusiveExpr from RuntimeFilters passed 
from Spark doesn't takes cares of case sensitivity : 
[CodePointer](https://github.com/apache/iceberg/blob/master/spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/source/SparkBatchQueryScan.java#L171)
   
   ```java
   Expression inclusiveExpr = 
Projections.inclusive(spec).project(runtimeFilterExpr);
   ```
   As per my understanding we should pass ``Projections.inclusive(spec, 
caseSensitive())`` to make sure iceberg also interprets it in the same way as 
spark does. Post adding this check the above UT succeeds.
   
   


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