tagomoris / presto-client-node

Distributed query engine Presto client library for node.js
MIT License
125 stars 57 forks source link

Code does not follow Presto HTTP Best Practices #3

Open thedillonb opened 8 years ago

thedillonb commented 8 years ago

Your code doesn't look like it follows what the Presto owners have dictated as the best way to interact with it via HTTP:

https://github.com/prestodb/presto/wiki/HTTP-Protocol

For example, you should not be checking the status field to find out if you need to wait longer for a query. As the Presto owners suggest:

The status field is only for displaying to humans as a hint about the query's state on the server. It is not in sync in the query state from the client's perspective and must not be used to determine whether the query is finished.

Instead, the code should be checking for a 503.

tagomoris commented 8 years ago

Oh, it's a bit new document! I don't have enough time to update this library, but pull-requests are welcome :)