-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working