alamb commented on issue #7039:
URL:
https://github.com/apache/arrow-datafusion/issues/7039#issuecomment-1649745009
> I think that we can do this safely when we are certain that the binary
data is valid UTF-8.
I agree -- I think it would be good to cast the column into `UTF8` (erroring
if it contains non UTF8 data)
For this particular query we could add an explicit cast like `::varchar`
perhaps like the following
```sql
SELECT
"MobilePhoneModel"::varchar,
COUNT(DISTINCT "UserID") AS u
FROM hits_partitioned
WHERE "MobilePhoneModel" <> ''
GROUP BY "MobilePhoneModel"
ORDER BY u DESC LIMIT 10;
```
--
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]