Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
lib.rs - source
[go: Go Back, main page]

datafusion_expr/
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//! [DataFusion](https://github.com/apache/datafusion)
28//! is an extensible query execution framework that uses
29//! [Apache Arrow](https://arrow.apache.org) as its in-memory format.
30//!
31//! This crate is a submodule of DataFusion that provides types representing
32//! logical query plans ([LogicalPlan]) and logical expressions ([Expr]) as well as utilities for
33//! working with these types.
34//!
35//! The [expr_fn] module contains functions for creating expressions.
36
37mod literal;
38mod operation;
39mod partition_evaluator;
40mod table_source;
41mod udaf;
42mod udf;
43mod udwf;
44
45pub mod conditional_expressions;
46pub mod execution_props;
47pub mod expr;
48pub mod expr_fn;
49pub mod expr_rewriter;
50pub mod expr_schema;
51pub mod function;
52pub mod select_expr;
53pub mod groups_accumulator {
54    pub use datafusion_expr_common::groups_accumulator::*;
55}
56pub mod interval_arithmetic {
57    pub use datafusion_expr_common::interval_arithmetic::*;
58}
59pub mod logical_plan;
60pub mod planner;
61pub mod registry;
62pub mod simplify;
63pub mod sort_properties {
64    pub use datafusion_expr_common::sort_properties::*;
65}
66pub mod statistics {
67    pub use datafusion_expr_common::statistics::*;
68}
69pub mod test;
70pub mod tree_node;
71pub mod type_coercion;
72pub mod utils;
73pub mod var_provider;
74pub mod window_frame;
75pub mod window_state;
76
77pub use datafusion_doc::{DocSection, Documentation, DocumentationBuilder};
78pub use datafusion_expr_common::accumulator::Accumulator;
79pub use datafusion_expr_common::columnar_value::ColumnarValue;
80pub use datafusion_expr_common::groups_accumulator::{EmitTo, GroupsAccumulator};
81pub use datafusion_expr_common::operator::Operator;
82pub use datafusion_expr_common::signature::{
83    ArrayFunctionArgument, ArrayFunctionSignature, Coercion, Signature, TypeSignature,
84    TypeSignatureClass, Volatility, TIMEZONE_WILDCARD,
85};
86pub use datafusion_expr_common::type_coercion::binary;
87pub use expr::{
88    Between, BinaryExpr, Case, Cast, Expr, GetFieldAccess, GroupingSet, Like,
89    Sort as SortExpr, TryCast, WindowFunctionDefinition,
90};
91pub use expr_fn::*;
92pub use expr_schema::ExprSchemable;
93pub use function::{
94    AccumulatorFactoryFunction, PartitionEvaluatorFactory, ReturnTypeFunction,
95    ScalarFunctionImplementation, StateTypeFunction,
96};
97pub use literal::{lit, lit_timestamp_nano, Literal, TimestampLiteral};
98pub use logical_plan::*;
99pub use partition_evaluator::PartitionEvaluator;
100pub use sqlparser;
101pub use table_source::{TableProviderFilterPushDown, TableSource, TableType};
102pub use udaf::{
103    aggregate_doc_sections, AggregateUDF, AggregateUDFImpl, ReversedUDAF,
104    SetMonotonicity, StatisticsArgs,
105};
106pub use udf::{
107    scalar_doc_sections, ReturnInfo, ReturnTypeArgs, ScalarFunctionArgs, ScalarUDF,
108    ScalarUDFImpl,
109};
110pub use udwf::{window_doc_sections, ReversedUDWF, WindowUDF, WindowUDFImpl};
111pub use window_frame::{WindowFrame, WindowFrameBound, WindowFrameUnits};
112
113#[cfg(test)]
114#[ctor::ctor]
115fn init() {
116    // Enable RUST_LOG logging configuration for test
117    let _ = env_logger::try_init();
118}