1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
//! Direct DataFusion integration for an existing Vortex
//! [`DataSourceRef`].
//!
//! Use this module when some other part of the system has already selected the
//! Vortex source to query and DataFusion only needs an adapter around it.
//!
//! Typical flow:
//!
//! 1. Build or obtain a Vortex [`DataSourceRef`].
//! 2. Wrap it in [`VortexTable`] to register it with a [`SessionContext`], or
//! build a [`VortexDataSource`] directly when constructing a
//! [`DataSourceExec`].
//! 3. Let DataFusion apply projection, filter, and limit pushdown through the
//! resulting adapter.
//!
//! The two main types are:
//!
//! - [`VortexTable`], the higher-level
//! [`TableProvider`] for `SessionContext::register_table`.
//! - [`VortexDataSource`], the lower-level
//! [`DataSource`] used when constructing physical plans directly.
//!
//! Compared with [`crate::VortexFormatFactory`], this module starts from an
//! already-constructed Vortex source instead of asking DataFusion to discover
//! `.vortex` files.
//!
//! [`DataSourceRef`]: vortex::scan::DataSourceRef
//! [`SessionContext`]: https://docs.rs/datafusion/latest/datafusion/prelude/struct.SessionContext.html
//! [`DataSourceExec`]: datafusion_datasource::source::DataSourceExec
//! [`TableProvider`]: datafusion_catalog::TableProvider
//! [`DataSource`]: datafusion_datasource::source::DataSource
pub use VortexDataSource;
pub use VortexTable;