geoHeil commented on issue #19866:
URL: https://github.com/apache/datafusion/issues/19866#issuecomment-3763964785

   The full stacktrace has:
   
   This issue was likely caused by a bug in DataFusion's code. Please help us 
to resolve this by filing a bug report in our issue tracker: 
https://github.com/apache/datafusion/issues
   
   at the bottom this is why I created the issue here.
   
   Shortened example:
   
   ```python
   
   from datetime import datetime, timezone
   from pathlib import Path
   
   import polars as pl
   from deltalake import DeltaTable, write_deltalake
   
   table_uri = str(Path("/tmp/delta_arrow_cast_datafusion").resolve())
   base_time = datetime(2024, 1, 1, tzinfo=timezone.utc)
   
   df = pl.DataFrame(
       {
           "sample_uid": ["a", "a"],
           "value": [1, 2],
           "created_at": [base_time, base_time],
       }
   )
   write_deltalake(table_uri, df, mode="overwrite")
   
   # Predicate emitted by DataFusion/ibis that triggers arrow_cast in 
DeltaTable.delete.
   predicate = (
       '"created_at" = ARROW_CAST('  # keep exact function name/casing
       "'2024-01-01 00:00:00+00:00', "
       "'Timestamp(Microsecond, Some(\"UTC\"))')"
   )
   DeltaTable(table_uri).delete(predicate=predicate)
   ```


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