Skip to content

Unsupported data type in hasher: Timestamp(Second, None) #1768

@jychen7

Description

@jychen7

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

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions