datafusion_sql/
lib.rs

1// Licensed to the Apache Software Foundation (ASF) under one
2// or more contributor license agreements.  See the NOTICE file
3// distributed with this work for additional information
4// regarding copyright ownership.  The ASF licenses this file
5// to you under the Apache License, Version 2.0 (the
6// "License"); you may not use this file except in compliance
7// with the License.  You may obtain a copy of the License at
8//
9//   http://www.apache.org/licenses/LICENSE-2.0
10//
11// Unless required by applicable law or agreed to in writing,
12// software distributed under the License is distributed on an
13// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14// KIND, either express or implied.  See the License for the
15// specific language governing permissions and limitations
16// under the License.
17
18#![doc(
19    html_logo_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg",
20    html_favicon_url = "https://raw.githubusercontent.com/apache/datafusion/19fe44cf2f30cbdd63d4a4f52c74055163c6cc38/docs/logos/standalone_logo/logo_original.svg"
21)]
22#![cfg_attr(docsrs, feature(doc_auto_cfg))]
23// Make sure fast / cheap clones on Arc are explicit:
24// https://github.com/apache/datafusion/issues/11143
25#![deny(clippy::clone_on_ref_ptr)]
26
27//! This crate provides:
28//!
29//! 1. A SQL parser, [`DFParser`], that translates SQL query text into
30//!    an abstract syntax tree (AST), [`Statement`].
31//!
32//! 2. A SQL query planner [`SqlToRel`] that creates [`LogicalPlan`]s
33//!    from [`Statement`]s.
34//!
35//! 3. A SQL [`unparser`] that converts [`Expr`]s and [`LogicalPlan`]s
36//!    into SQL query text.
37//!
38//! [`DFParser`]: parser::DFParser
39//! [`Statement`]: parser::Statement
40//! [`SqlToRel`]: planner::SqlToRel
41//! [`LogicalPlan`]: datafusion_expr::logical_plan::LogicalPlan
42//! [`Expr`]: datafusion_expr::expr::Expr
43
44mod cte;
45mod expr;
46pub mod parser;
47pub mod planner;
48mod query;
49mod relation;
50pub mod resolve;
51mod select;
52mod set_expr;
53mod stack;
54mod statement;
55#[cfg(feature = "unparser")]
56pub mod unparser;
57pub mod utils;
58mod values;
59#[deprecated(
60    since = "46.0.0",
61    note = "use datafusion_common::{ResolvedTableReference, TableReference}"
62)]
63pub use datafusion_common::{ResolvedTableReference, TableReference};
64pub use sqlparser;