datafusion_sql/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#![doc(
6 html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
7 html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
8)]
9#![cfg_attr(docsrs, feature(doc_cfg))]
10// Make sure fast / cheap clones on Arc are explicit:
11// https://github.com/apache/datafusion/issues/11143
12#![deny(clippy::clone_on_ref_ptr)]
13#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
14
15//! This crate provides:
16//!
17//! 1. A SQL parser, [`DFParser`], that translates SQL query text into
18//! an abstract syntax tree (AST), [`Statement`].
19//!
20//! 2. A SQL query planner [`SqlToRel`] that creates [`LogicalPlan`]s
21//! from [`Statement`]s.
22//!
23//! 3. A SQL [`unparser`] that converts [`Expr`]s and [`LogicalPlan`]s
24//! into SQL query text.
25//!
26//! [`DFParser`]: parser::DFParser
27//! [`Statement`]: parser::Statement
28//! [`SqlToRel`]: planner::SqlToRel
29//! [`LogicalPlan`]: datafusion_expr::logical_plan::LogicalPlan
30//! [`Expr`]: datafusion_expr::expr::Expr
31
32mod cte;
33mod expr;
34pub mod parser;
35pub mod planner;
36mod query;
37mod relation;
38pub mod resolve;
39mod select;
40mod set_expr;
41mod stack;
42mod statement;
43#[cfg(feature = "unparser")]
44pub mod unparser;
45pub mod utils;
46mod values;
47pub use sqlparser;