-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
Currently, Aggregation Fuzzer verifies results against DuckDB. However, not all functions are available in DuckDB and sometimes semantics don't match. It would be better to verify against Presto Java.
We could launch PrestoJava process and talk to it via REST API: https://prestodb.io/docs/current/develop/client-protocol.html
I put together a prototype of a PrestoQueryRunner that can execute Presto queries:
There are a few things to figure out still.
(1) By default, Presto returns results in JSON format. This is slow and hard to parse. Hence, I hacked Presto to return results in PrestoPage format (base64-encoded). Perhaps, we could introduce a new HTTP header that a client would specify to request PrestoPage format instead of default JSON format.
(2) The PrestoQueryRunner needs HTTP client. I'm using Proxygen as it is already available in Prestissimo. However, we need this code in Velox, so we can run fuzzer on each PR. Hence, we need to figure out how to add Proxygen dependency to Velox.
(3) PrestoQueryRunner code needs to be hooked into the Aggregation Fuzzer.
CC: @amitkdutta @aditi-pandit @kgpai @laithsakka @pedroerp @spershin