mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
prqlc::compile can panic on some inputs (e.g. a todo!() in type_intersection reached via append with type-incompatible columns). The prql_to_sql bridge wraps the call in std::panic::catch_unwind, but the wrapped prql_to_sql_impl was itself declared extern "C", so the panic hit that nounwind frame and aborted the process (SIGABRT, panic_in_cleanup) before catch_unwind could run. Make prql_to_sql_impl a plain Rust fn so the panic unwinds normally into catch_unwind and is turned into an error code, raised as a SYNTAX_ERROR by ParserPRQLQuery instead of crashing the server. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Read more about the Rust integration in the blog: