graphql-engine/v3/crates/sql
Daniel Harvey 1879d1bb75 Enable argument presets in OpenDD pipeline (#1228)
<!-- The PR description should answer 2 important questions: -->

### What

This PR enables argument presets in the OpenDD pipeline by using
functions from `graphql_ir`. In the ideal future we'd flip the
dependency and move these functions out of `graphql_ir` and into the
`plan` crate, however we can't do that until `execute` crate is no
longer in active development as it will involve making a big mess there.

### How

- Calculate argument presets in the `plan/query/model_target` module
using functions from `graphql_ir`
- We also begin adding boolean expression resolve, then back away slowly
as it's a massive job and better tackled when we start making `where`
clauses work in this pipeline, to stop this PR ballooning insanely.

V3_GIT_ORIGIN_REV_ID: 47867452b7366e83f71b118e37302de93d9bde72
2024-10-17 10:48:04 +00:00
..
src Enable argument presets in OpenDD pipeline (#1228) 2024-10-17 10:48:04 +00:00
Cargo.toml Move model planning from sql to plan (#1166) 2024-09-27 14:21:19 +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.