3 ms·
This is truly a fantastic combination -- implement the logic in Rust and use it in Python. GreptimeDB also implements a similar functionality that allows writin
by waynehn 4y ago
This is truly a fantastic combination -- implement the logic in Rust and use it in Python. GreptimeDB also implements a similar functionality that allows writing Python script to do post-process of SQL query results, with the help of RustPython and Arrow. Maybe this combination can bring a sweet point between performance and efficiency.
docs: https://docs.greptime.com/user-guide/coprocessor-and-scripting https://docs.greptime.com/user-guide/coprocessor-and-scripti...
code: https://github.com/GreptimeTeam/greptimedb/tree/develop/src/script https://github.com/GreptimeTeam/greptimedb/tree/develop/src/...
- orangepurple 4y agoPython 3 can be executed server side by Postgres as well CREATE FUNCTION pymax (a integer, b integer) RETURNS integer AS $$ if a > b: return a return b $$ LANGUAGE plpython3u; https://www.postgresql.org/docs/current/plpython.html https://www.postgresql.org/docs/current/plpython.html
- waynehn 4y agoActually Postgres does it better. Greptime only supports writing Python logic as a post cooprocessor for now, but not as an in-query function. We are trying to evolve towards the Postgres' functionality you mention.
- VWWHFSfQ 4y agoPython running in Postgres sounds like it would be unusably slow. What's the performance like?
- orangepurple 4y agoI have no idea who uses it.