rdf_fusion_execution/
lib.rs

1#![doc(test(attr(deny(warnings))))]
2#![doc(
3    html_favicon_url = "https://raw.githubusercontent.com/tobixdev/rdf-fusion/main/misc/logo/logo.png"
4)]
5#![doc(
6    html_logo_url = "https://raw.githubusercontent.com/tobixdev/rdf-fusion/main/misc/logo/logo.png"
7)]
8
9//! This crate defines the execution engine of RDF Fusion.
10//!
11//! # RDF Fusion Context
12//!
13//! Similar to DataFusion’s [`SessionContext`](datafusion::prelude::SessionContext),
14//! RDF Fusion provides an [`RdfFusionContext`].
15//! This context manages the state of the RDF Fusion engine, including the registered RDF term
16//! encodings.
17//! For more details, see the [`RdfFusionContext`] documentation.
18//!
19//! # Executing SPARQL Queries
20//!
21//! DataFusion operates on the concept of a *logical plan*.
22//! While DataFusion includes an SQL front-end, it does not provide a SPARQL front-end.
23//! To execute SPARQL queries, we convert them into logical plans through the following pipeline:
24//!
25//! ```text
26//! Query String -> SPARQL Algebra (Oxigraph) -> Logical Plan
27//! ```
28//!
29//! The query string is first parsed by Oxigraph’s SPARQL parser, which produces a SPARQL algebra
30//! graph pattern. This graph pattern already includes high-level concepts such as `Join`, `Filter`,
31//! and `Projection`.
32//!
33//! We then convert this algebra pattern into a DataFusion logical plan through a rewriting step.
34//! The resulting logical plan is executed by DataFusion.
35
36extern crate core;
37
38mod engine;
39mod planner;
40pub mod results;
41pub mod sparql;
42
43pub use engine::RdfFusionContext;