graphql-engine/v3/crates/sql
Daniel Harvey ffa43e3c57 Construct empty sql catalog if feature switched off (#1034)
<!-- The PR description should answer 2 important questions: -->

### What

We don't need to do this work if the feature isn't turned on.

### How

Create a new `Catalog::empty_from_metadata` function that is essentially
`mempty`.

V3_GIT_ORIGIN_REV_ID: 594462e729ff4afc3bee4db9e4b8e44d41020428
2024-08-29 14:56:09 +00:00
..
src Construct empty sql catalog if feature switched off (#1034) 2024-08-29 14:56:09 +00:00
Cargo.toml [PACHA-4] initial support for commands (#975) 2024-08-18 03:34:15 +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.