I'm wondering if it would be worth skipping the SQL layer and compiling straight to the execution plan level. This would make PRQL tightly coupled to a database, but would also unlock performance and fine-tuning potential. And, maybe it would be possible to run it inside the database process, enabling data processing right at the source.
(eg. in Postgres, this would be more or less a replacement of the PREPARE statement.)
(eg. in Postgres, this would be more or less a replacement of the PREPARE statement.)