exmy opened a new issue, #12834:
URL: https://github.com/apache/gluten/issues/12834

   ### Backend
   
   CH (ClickHouse)
   
   ### Bug description
   
   ## Description
   
   The ClickHouse backend may return incorrect results for a `GROUPING SETS` 
query when:
   
   - an Expand projection selects a constant input column;
   - another projection replaces the same column with `NULL`;
   - a downstream filter such as `IS NOT NULL` is applied.
   
   The rows containing `NULL` may incorrectly pass the filter.
   
   ## Reproduction
   
   ```sql
   SELECT msg_type, os, COUNT(*) AS cnt
   FROM (
     SELECT 'file' AS msg_type, 'Android' AS os, id FROM range(10)
     UNION ALL
     SELECT 'file' AS msg_type, 'iOS' AS os, id FROM range(10)
   ) t
   GROUP BY GROUPING SETS ((msg_type), (os))
   HAVING msg_type IS NOT NULL
   ORDER BY msg_type, os, cnt;
   ```
   
   ## Expected result
   ```text
   file  NULL  20
   ```
   
   ## Actual result
   ```text
   NULL  Android  10
   NULL  iOS      10
   file  NULL     20
   ```
   
   
   
   
   ### Gluten version
   
   _No response_
   
   ### Spark version
   
   None
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   
   ```


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