trinodb / trino

Official repository of Trino, the distributed SQL query engine for big data, formerly known as PrestoSQL (https://trino.io)
https://trino.io
Apache License 2.0
10.42k stars 3k forks source link

ResultSet.getString is not useful for types backed by byte[] #6248

Open findepi opened 3 years ago

findepi commented 3 years ago

For example when reading qdigest this returns something like [B@2de82bf8

Relates to: https://github.com/prestosql/presto/issues/6247

findepi commented 3 years ago

Perhaps we could realize value is an array and use java.util.Arrays#deepToString @ https://github.com/prestosql/presto/blob/04533cc4cfcc3e41d7c063a27830c40b656a88df/presto-jdbc/src/main/java/io/prestosql/jdbc/AbstractPrestoResultSet.java#L204

findepi commented 3 years ago

cc @electrum @losipiuk @kokosing thoughts?

also, would be good to check what other JDBC driver vendors do.

losipiuk commented 3 years ago

also, would be good to check what other JDBC driver vendors do

That was exactly my though. I think we should mimic what others do. Hopefully there is some consensus already.