prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
15.97k stars 5.35k forks source link

How to integrate TimescaleDB #16542

Open dberardo-com opened 3 years ago

dberardo-com commented 3 years ago

Hi community,

i was thinking whether it could be valuable to connect timescaleDB to an existing Presto engine using the JDBC connector.

My question would be: would it still be possible to use timescale specific (non SQL standard) queries in Presto (like time_bucket) or would it not work ?

thanks

rohanpednekar commented 3 years ago

Hi @dberardo-com, It is not something widely tested, you may need to test it in-house. Also, you may need to evaluate performance if that's other criteria but if you are trying to solve a federation use case and looking for just access to timescaleDB data it may work for you.

dberardo-com commented 3 years ago

hi @rohanpednekar , thanks for the quick answer.

My aim would be to use only one client connection to Presto from a ruby on rails application and sends all the requests through that connection.

Is it possible to "tell" Presto to bypass the query parsing and execution and passing it through to the underlying database to perform the query? This would be very useful for non-standard SQL queries, like "time_bucket" for example

dberardo-com commented 3 years ago

@rohanpednekar here a reply to the same question on timescale's github: https://github.com/timescale/timescaledb/issues/3452#issuecomment-891444900

how are "unknown" UDFs handled by Presto?

mmphsb commented 1 year ago

Considering https://github.com/prestodb/presto/issues/14579, I understand that it is not possible to use a user defined function from PostgreSQL via PrestoDB (I am only interested in query federation at this point) unless it is implemented as a PrestoDB plugin. Or did something change since the last comment of this thred? When I try, I simply get "Function not registered" error. Thanks in advance!