Repository navigation
Internal error : Unsupported data type in hasher #821
Description
Describe the bug
while running the below SQL, I hit this internal error
Error running remote query: status: Internal, message: "Internal error reading points from database 844910ece80be8bc_3c0bd4c89186ca89: Internal error executing plan: Arrow error: External error: Arrow error: External error: Arrow error: External error: Execution error: Internal error: Unsupported data type in hasher. 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", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Tue, 03 Aug 2021 18:55:08 GMT"} }
To Reproduce
SQL:
SELECT Row_number()
OVER (
partition BY Date_trunc('minute', time), bucket_id, partition_id
ORDER BY time DESC) AS rn,
gauge,
Date_trunc('minute', time) AS time_bucket,
env
FROM storage_usage_bucket_cardinality
WHERE Cast(time AS BIGINT) > Cast(Now() AS BIGINT) - 5 * 60 * 1000000000
AND time <= Now();
Description of table storage_usage_bucket_cardinality
+---------------+--------------+----------------------------------+--------------+-----------------------------+-------------+
| table_catalog | table_schema | table_name | column_name | data_type | is_nullable |
+---------------+--------------+----------------------------------+--------------+-----------------------------+-------------+
| public | iox | storage_usage_bucket_cardinality | bucket_id | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | env | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | gauge | Float64 | YES |
| public | iox | storage_usage_bucket_cardinality | host | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | hostname | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | node_id | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | nodename | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | org_id | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | partition_id | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | role | Dictionary(Int32, Utf8) | YES |
| public | iox | storage_usage_bucket_cardinality | time | Timestamp(Nanosecond, None) | NO |
| public | iox | storage_usage_bucket_cardinality | url | Dictionary(Int32, Utf8) | YES |
+---------------+--------------+----------------------------------+--------------+-----------------------------+-------------+
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
Activity
Dandandan commentedon Aug 3, 2021
The error message could be improved.
I think it's trying to hash the dictionaries
bucket_idandpartition_idwhich misses.an implementation.There is a PR over here from @alamb to support this.
#812
alamb commentedon Aug 4, 2021
I will figure this one out
alamb commentedon Aug 4, 2021
Here is a reproducer:
Fails with:
I confirmed that the test passes with the changes in #812. I will merge #812 as is and then add a specific test in a follow on
fix: Check sort order of SortExec instead of child output (apache#821)