sunshone commented on PR #13470:
URL: https://github.com/apache/gluten/pull/13470#issuecomment-6741185761

   @philo-he Thank you for the review — both points are addressed.
   
   The PR description is updated to reflect the latest state of the branch 
(rebased onto the current main tip, and the CAST narrowing below).
   
   The AI comment does make sense, and the guard is fixed accordingly: CAST to 
TIME was allowed for any operand type, so CAST(ts_col AS TIME) lowered to a 
velox cast(timestamp AS integer) that computes no milliseconds-of-day, and 
CAST(str_col AS TIME) a cast(varchar AS integer) that cannot parse a 
time-of-day string. The guard now rejects CAST to TIME unless the operand is 
already TIME-typed: CAST between TIME-typed values (e.g. the upstream 
CAST(CURRENT_TIME AS TIME)) and TIME literals still plan through, while CAST to 
TIME from other types is rejected at plan time like the other unsupported TIME 
expressions. A planner test covers CAST(ts_col AS TIME) and CAST(str_col AS 
TIME) rejections plus the TIME-to-TIME pass-through, and the upstream 
CURRENT_DATE / CURRENT_TIME suites (including the CAST(CURRENT_TIME AS TIME) 
case) pass on this branch.


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