datafusion/prelude.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//! DataFusion "prelude" to simplify importing common types.
19//!
20//! Like the standard library's prelude, this module simplifies importing of
21//! common items. Unlike the standard prelude, the contents of this module must
22//! be imported manually:
23//!
24//! ```
25//! use datafusion::prelude::*;
26//! ```
27
28pub use crate::dataframe;
29pub use crate::dataframe::DataFrame;
30pub use crate::execution::context::{SQLOptions, SessionConfig, SessionContext};
31pub use crate::execution::options::{
32 AvroReadOptions, CsvReadOptions, NdJsonReadOptions, ParquetReadOptions,
33};
34
35pub use datafusion_common::Column;
36pub use datafusion_expr::{
37 expr_fn::*,
38 lit, lit_timestamp_nano,
39 logical_plan::{JoinType, Partitioning},
40 Expr,
41};
42pub use datafusion_functions::expr_fn::*;
43#[cfg(feature = "nested_expressions")]
44pub use datafusion_functions_nested::expr_fn::*;
45
46pub use std::ops::Not;
47pub use std::ops::{Add, Div, Mul, Neg, Rem, Sub};
48pub use std::ops::{BitAnd, BitOr, BitXor};
49pub use std::ops::{Shl, Shr};