datafusion_session/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: See the NOTICE file distributed with this work for additional information regarding copyright ownership
3// SPDX-FileContributor: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements
4
5// Make sure fast / cheap clones on Arc are explicit:
6// https://github.com/apache/datafusion/issues/11143
7#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
8#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
9
10//! Session APIs for the DataFusion query execution environment
11//!
12//! This crate defines shared interfaces for session-related APIs and extension
13//! points. Concrete query-engine implementations are provided by higher-level
14//! DataFusion crates.
15//!
16//! Key components:
17//! * [`Session`] - Describes a query execution context, including configurations,
18//! catalogs, and runtime state
19//! * [`CatalogProviderList`], [`CatalogProvider`], and [`SchemaProvider`] -
20//! Describe catalog hierarchies
21//! * [`TableProvider`] - Provides data for query planning and execution
22//! * [`QueryPlanner`], [`PhysicalPlanner`], and [`ExtensionPlanner`] - Query and
23//! physical planning contracts
24//! * [`PhysicalOptimizerRule`] and [`PhysicalOptimizerContext`] - Physical
25//! optimization contracts
26//! * [`SessionStore`] - Handles session persistence and retrieval
27//!
28//! The session system enables:
29//! * Configuration management for query execution
30//! * Catalog and schema management
31//! * Function registry access
32//! * Runtime environment configuration
33//! * Query state persistence
34
35pub mod catalog;
36pub mod physical_optimizer;
37pub mod planner;
38pub mod schema;
39pub mod session;
40pub mod table;
41
42pub use crate::catalog::{
43 CatalogProvider, CatalogProviderFactory, CatalogProviderList,
44 EmptyCatalogProviderList,
45};
46pub use crate::physical_optimizer::{
47 PhysicalOptimizerContext, PhysicalOptimizerRule, with_statistics_context,
48};
49pub use crate::planner::{
50 ExtensionPlanner, PhysicalPlanner, QueryPlanner, UnsupportedQueryPlanner,
51};
52pub use crate::schema::SchemaProvider;
53pub use crate::session::{Session, SessionStore};
54pub use crate::table::{
55 ScanArgs, ScanResult, TableFunction, TableFunctionArgs, TableFunctionImpl,
56 TableProvider, TableProviderFactory,
57};