prestodb/presto-go-client

Add support for Presto warnings

ggreg opened this issue · 3 comments

ggreg commented

Presto now may returns a list of warnings in the warnings field of the JSON struct returned by then coordinator when the client polls the status of a query.

The warning are useful to surface issues in queries at runtime.

How do other clients consume these warning messages?

Since the Go client implements the standard database/sql interface, it doesn't leave many choices for users to receive this message as part of their query results.

We'd have to find a way to pass them back to users somehow.

Some examples are the jdbc and presto-cli. The jdbc driver has a standard method getWarnings() which is part of the interface and presto-cli displays warnings on stderr.

Both use the presto-client which as @ggreg mentioned has a "warnings" field with a list of warnings.

Given that we don't actually have a proper solution this, going to close the task until there's a PR that can be reviewed.