yucheng-du opened a new pull request, #55880:
URL: https://github.com/apache/arrow/pull/55880

   ### Rationale for this change
   
   A Parquet scan can skip matching rows when an `is_in` value set has a 
different type from the column. For example, looking for the double `0.1` in a 
float32 column matches in memory, but a comparison against the row-group 
minimum can discard that value. Negating the filter can also return rows that 
should be excluded.
   
   ### What changes are included in this PR?
   
   Compare the row-group bound against the value set cast to the input type, as 
set lookup does. If this cast fails, leave the expression alone so set lookup 
can use its fallback. Keep the original set type in the simplified expression.
   
   ### Are these changes tested?
   
   Added regression cases for double, string, and integer sets against a 
float32 column. All 56 C++ expression tests pass. Also checked `IN` and `NOT 
IN` against four Parquet files with a locally built Dataset scanner, including 
a date32 column and a timestamp set.
   
   ### Are there any user-facing changes?
   
   **This PR contains a "Critical Fix".** Filters on mixed types could silently 
return incorrect rows when pruning was enabled.
   
   ### Was AI used for this PR?
   
   **PR code and description written by:**
   
   - [ ] Human
   - [x] AI
   
   **Reviewed before submission by:**
   
   - [ ] Human
   - [x] AI
   - [ ] Not reviewed
   
   GPT-6.2 Astra (ultra effort) wrote and reviewed the patch, tests, and PR 
description.
   


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