andygrove opened a new issue, #4556:
URL: https://github.com/apache/datafusion-comet/issues/4556

   ## Summary
   
   `to_date` and `to_timestamp` are accelerated by Comet, but their `try_` 
counterparts `try_to_date` and `try_to_timestamp` currently fall back to Spark. 
All four are `RuntimeReplaceable` (`ParseToDate` / `ParseToTimestamp`) and 
lower to the same building blocks (`Cast`, or `Cast(GetTimestamp(...))` when a 
format is supplied) that Comet already supports, so the `try_` forms should be 
acceleratable too. The only difference is that the `try_` builders construct 
the replacement with `failOnError = false`.
   
   ## Evidence
   
   SQL file tests added in #4555 
(`spark/src/test/resources/sql-tests/expressions/datetime/try_datetime.sql`) 
show `try_to_date` and `try_to_timestamp` falling back for column args, literal 
args, and the with-format case, so those queries are currently marked `query 
spark_answer_only`.
   
   ## Proposal
   
   Investigate why the `try_to_date` / `try_to_timestamp` rewrite is not 
accelerated when `to_date` / `to_timestamp` is (likely something about the 
`EvalMode` / `failOnError = false` path or the `GetTimestamp` wrapping), and 
close the gap so the `try_` forms run natively.
   
   ## Acceptance criteria
   
   - `try_to_date` and `try_to_timestamp` execute natively in Comet and match 
Spark, including the NULL-on-invalid-input behavior.
   - Promote the corresponding queries in `try_datetime.sql` (#4555) from 
`query spark_answer_only` to the default `query` mode.


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