graphql-engine/v3/crates/sql
Daniel Harvey 056b1c18fc Stop Nix rebuilding (#1329)
<!-- The PR description should answer 2 important questions: -->

### What

Our Nix build was building all the workspace crates as part of it's deps
step. This means when any library crate is changed, we throw away all
the caching, which isn't ideal. This filters the source files out of
those builds, so that we get more cache hits. We also move all Cargo
features into the workspace, which I've been meaning to do for ages, so
things are more consistent, and again, we get more cache hits generally.

V3_GIT_ORIGIN_REV_ID: c724b152692575edf6c00ab426e48ecca13aa998
2024-11-11 12:06:31 +00:00
..
src Upgrade to NDC v0.2.0-rc.1 (#1291) 2024-11-06 13:08:10 +00:00
Cargo.toml Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
readme.md Refactor SQL layer to use OpenDD query IR (#925) 2024-08-05 23:38:19 +00:00

SQL Interface

An experimental SQL interface over OpenDD models. This is mostly targeted at AI use cases for now - GenAI models are better at generating SQL queries than GraphQL queries.

This is implemented using the Apache DataFusion Query Engine by deriving the SQL metadata for datafusion from Open DDS metadata. As the implementation currently stands, once we get a LogicalPlan from datafusion we replace TableScans with NDC queries to the underlying connector. There is a rudimentary optimizer that pushes down projections to the opendd query so that we don't fetch all the columns of a collection.