Skip to content

Commit a52eb47

Browse files
authored
Improve documentation for TableProvider (#13724)
1 parent 93b3d9c commit a52eb47

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

datafusion/catalog/src/table.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,19 @@ use datafusion_expr::{
3333
};
3434
use datafusion_physical_plan::ExecutionPlan;
3535

36-
/// Source table
36+
/// A named table which can be queried.
37+
///
38+
/// Please see [`CatalogProvider`] for details of implementing a custom catalog.
39+
///
40+
/// [`TableProvider`] represents a source of data which can provide data as
41+
/// Apache Arrow `RecordBatch`es. Implementations of this trait provide
42+
/// important information for planning such as:
43+
///
44+
/// 1. [`Self::schema`]: The schema (columns and their types) of the table
45+
/// 2. [`Self::supports_filters_pushdown`]: Should filters be pushed into this scan
46+
/// 2. [`Self::scan`]: An [`ExecutionPlan`] that can read data
47+
///
48+
/// [`CatalogProvider`]: super::CatalogProvider
3749
#[async_trait]
3850
pub trait TableProvider: Debug + Sync + Send {
3951
/// Returns the table provider as [`Any`](std::any::Any) so that it can be

0 commit comments

Comments
 (0)