NoahKusaba opened a new issue, #2965:
URL: https://github.com/apache/datafusion-ballista/issues/2965
**Describe the bug**
After `SET datafusion.execution.time_zone = 'UTC'`, `to_timestamp` over a
column returns `Timestamp(ns)` batches with no time zone on Ballista. The
plan's schema says `Timestamp(ns, "UTC")`, which is also what DataFusion
returns. This happens with both planners.
**To Reproduce**
Standalone Ballista on `main` (446fa54c9), default settings:
```sql
SET datafusion.execution.time_zone = 'UTC';
SELECT arrow_typeof(to_timestamp(s)), to_timestamp(s)
FROM (VALUES ('2020-09-08T13:42:29'), ('2020-09-08T13:42:29Z')) AS t(s);
```
DataFusion returns `Timestamp(ns, "UTC")` and `2020-09-08T13:42:29Z`.
Ballista returns `Timestamp(ns)` and `2020-09-08T13:42:29`, and the batches'
type doesn't match `DataFrame::schema()`.
**Expected behavior**
The configured time zone is applied wherever the function runs.
**Additional context**
Found by running DataFusion's sqllogictest files on Ballista (#2945):
`to_timestamp_timezone.slt` (194, 210, 216, 222),
`from_unixtime_timezone.slt:61`, and `datetime/timestamps*.slt`. The `.slt`
test cites apache/datafusion#24632, where array input had to start carrying the
configured time zone. On Ballista the function seems to run with the executor's
session config instead of the client's. I haven't confirmed this.
--
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]