Omega359 commented on issue #13625:
URL: https://github.com/apache/datafusion/issues/13625#issuecomment-2518071677
So, I just ran the following against main as of a few days ago:
```
:/apache_datafusion# docker run --rm -it datafusion-cli
DataFusion CLI v43.0.0
> create table logs(timestamp varchar);
0 row(s) fetched.
Elapsed 0.003 seconds.
> insert into logs values ('2023-01-01T09:00:02');
+-------+
| count |
+-------+
| 1 |
+-------+
1 row(s) fetched.
Elapsed 0.001 seconds.
> SELECT
EXTRACT(YEAR FROM timestamp) as year,
EXTRACT(MONTH FROM timestamp) as month,
COUNT(*) as count
FROM logs
WHERE timestamp IS NOT NULL
GROUP BY
EXTRACT(YEAR FROM timestamp),
EXTRACT(MONTH FROM timestamp)
ORDER BY year, month;
+------+-------+-------+
| year | month | count |
+------+-------+-------+
| 2023 | 1 | 1 |
+------+-------+-------+
1 row(s) fetched.
Elapsed 0.012 seconds.
```
--
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]