[
https://issues.apache.org/jira/browse/ARROW-12277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrew Lamb updated ARROW-12277:
--------------------------------
Description:
If you try and aggregate (via MIN, for example) a column of a timestamp type,
it generates an error:
```
Coercion from [Timestamp(Nanosecond, None)] to the signature Uniform(1, [Int8,
Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64]) failed.
```
For example:
{code}
> show columns from t;
+---------------+--------------+------------+-------------+-----------------------------+-------------+
| table_catalog | table_schema | table_name | column_name | data_type
| is_nullable |
+---------------+--------------+------------+-------------+-----------------------------+-------------+
| datafusion | public | t | a | Utf8
| NO |
| datafusion | public | t | b |
Timestamp(Nanosecond, None) | NO |
+---------------+--------------+------------+-------------+-----------------------------+-------------+
2 row in set. Query took 0 seconds.
> select sum(b) from t;
Plan("Coercion from [Timestamp(Nanosecond, None)] to the signature Uniform(1,
[Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64])
failed.")
{code}
was:
If you try and aggregate (via SUM, for example) a column of a timestamp type,
it generates an error:
```
Coercion from [Timestamp(Nanosecond, None)] to the signature Uniform(1, [Int8,
Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64]) failed.
```
For example:
{code}
> show columns from t;
+---------------+--------------+------------+-------------+-----------------------------+-------------+
| table_catalog | table_schema | table_name | column_name | data_type
| is_nullable |
+---------------+--------------+------------+-------------+-----------------------------+-------------+
| datafusion | public | t | a | Utf8
| NO |
| datafusion | public | t | b |
Timestamp(Nanosecond, None) | NO |
+---------------+--------------+------------+-------------+-----------------------------+-------------+
2 row in set. Query took 0 seconds.
> select sum(b) from t;
Plan("Coercion from [Timestamp(Nanosecond, None)] to the signature Uniform(1,
[Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64])
failed.")
{code}
> [Rust][DataFusion] Min/Max are not supported for timestamp types
> ----------------------------------------------------------------
>
> Key: ARROW-12277
> URL: https://issues.apache.org/jira/browse/ARROW-12277
> Project: Apache Arrow
> Issue Type: Improvement
> Reporter: Andrew Lamb
> Assignee: Andrew Lamb
> Priority: Major
> Labels: pull-request-available
> Time Spent: 4h
> Remaining Estimate: 0h
>
> If you try and aggregate (via MIN, for example) a column of a timestamp type,
> it generates an error:
> ```
> Coercion from [Timestamp(Nanosecond, None)] to the signature Uniform(1,
> [Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64])
> failed.
> ```
> For example:
> {code}
> > show columns from t;
> +---------------+--------------+------------+-------------+-----------------------------+-------------+
> | table_catalog | table_schema | table_name | column_name | data_type
> | is_nullable |
> +---------------+--------------+------------+-------------+-----------------------------+-------------+
> | datafusion | public | t | a | Utf8
> | NO |
> | datafusion | public | t | b |
> Timestamp(Nanosecond, None) | NO |
> +---------------+--------------+------------+-------------+-----------------------------+-------------+
> 2 row in set. Query took 0 seconds.
> > select sum(b) from t;
> Plan("Coercion from [Timestamp(Nanosecond, None)] to the signature Uniform(1,
> [Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Float32, Float64])
> failed.")
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)