jonahgao commented on issue #7344: URL: https://github.com/apache/arrow-datafusion/issues/7344#issuecomment-1690142125
> I'm wondering if an implicit cast is really the right solution here. Maybe a better solution would be to declare the schema / override the type in the `CREATE TABLE` statement. Yes, I think the simplest fix is to rewrite the query as ```sql SELECT "CounterID", AVG(length(URL::TEXT)) AS l, COUNT(*) AS c FROM hits WHERE "URL" <> '' GROUP BY "CounterID" HAVING COUNT(*) > 100000 ORDER BY l DESC LIMIT 25; ``` We actually need `character_length` of text string here, so that the results should be consistent with others. Calculating the length of a binary type may yield different results. -- 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]
