jychen7 opened a new issue #1768:
URL: https://github.com/apache/arrow-datafusion/issues/1768
**Describe the bug**
Datafusion have 4 specific functions related to timestamp:
- to_timestamp (nano)
- to_timestamp_micros
- to_timestamp_millis
- to_timestamp_seconds
only `to_timestamp_seconds` is NOT supported in hasher, while other 3 are
supported.
**To Reproduce**
use testing data
```
CREATE EXTERNAL TABLE x (
c9 BIGINT NOT NULL
)
STORED AS CSV
WITH HEADER ROW
LOCATION '/testing/data/csv/aggregate_test_100.csv';
```
`to_timestamp_millis` works in group by
```
select to_timestamp_millis(c9 * 1000), count(1) from x
group by 1
limit 1;
```
`to_timestamp_seconds` raise error in group by
```
select to_timestamp_seconds(c9), count(1) from x
group by 1
limit 1;
```
> Internal error: Unsupported data type in hasher: Timestamp(Second, None).
This was likely caused by a bug in DataFusion's code and we would welcome that
you file an bug report in our issue tracker
**Expected behavior**
```
select to_timestamp_seconds(c9), count(1) from x
group by 1
limit 1;
```
should return value
**Additional context**
--
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]