wenfang6 opened a new issue, #10326:
URL: https://github.com/apache/incubator-gluten/issues/10326

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   Gluten returns incorrect results when comparing string timestamps with 
TIMESTAMP columns using CAST(... AS TIMESTAMP) in a join condition. Spark 
filters the row out correctly, but Gluten includes it erroneously.
   
   example:
   ```
   CREATE TABLE test_timestamp (
     start_date TIMESTAMP,
     end_date TIMESTAMP,
     id BIGINT COMMENT);
   USING parquet
   create table test_action_di(
          date_time STRING,
          actionp STRING
   );
   insert into table dap_dev.test_timestamp values('2025-06-03 08:50:19', 
'2025-07-02 23:59:59', 12896877);
   insert into table test_action_di values('2025-06-03 
08:49:56.427','12896877');
   query:
   select id, date_time, start_date, end_date 
   from dap_dev.test_action_di s
   join dap_dev.test_timestamp t on s.actionp = cast(t.id as string)
   and cast(s.date_time as timestamp)>t.start_date
   ```
   Expected Behavior
   This row should be filtered out because:
   `CAST('2025-06-03 08:49:56.427' AS TIMESTAMP) < TIMESTAMP '2025-06-03 
08:50:19'`
   
   Actual Behavior (Gluten)
   Gluten incorrectly includes this row in the result, violating the timestamp 
comparison logic.
   Returned result from Gluten:
   
   ```
   id         | date_time               | start_date             | end_date
   ------------------------------------------------------------------------
   12896877   | 2025-06-03 08:49:56.427 | 2025-06-03 08:50:19    | 2025-07-02 
23:59:59
   ```
   
   ### Gluten version
   
   Gluten-1.3
   
   ### Spark version
   
   Spark-3.5.x
   
   ### 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