Skip to main content

flow/
lib.rs

1// Copyright 2023 Greptime Team
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! Flow execution and flownode services.
16
17#![allow(dead_code)]
18#![warn(clippy::too_many_lines)]
19
20// TODO(discord9): enable this lint to handle out of bound access
21// #![cfg_attr(not(test), warn(clippy::indexing_slicing))]
22
23// allow unused for now because it should be use later
24mod adapter;
25pub(crate) mod batching_mode;
26mod df_optimizer;
27pub(crate) mod engine;
28pub mod error;
29mod expr;
30pub mod heartbeat;
31mod metrics;
32mod repr;
33mod server;
34mod utils;
35
36#[cfg(test)]
37mod test_utils;
38
39pub use adapter::flownode_impl::FlowDualEngineRef;
40pub use adapter::{FlowConfig, FlowStreamingEngineRef, StreamingEngine};
41pub use batching_mode::BatchingModeOptions;
42pub use batching_mode::batching_execution::{BatchingExecution, BatchingExecutionFactory};
43pub use batching_mode::frontend_client::{
44    FrontendClient, GrpcQueryHandlerWithBoxedError, PeerDesc,
45};
46pub use batching_mode::task::{
47    BatchingExecutionGuard, BatchingTask, DirtyRestore, ExecuteOnceOutcome, PlanInfo,
48    QueryCoverage, TaskArgs,
49};
50pub use batching_mode::time_window::{TimeWindowExpr, find_time_window_expr};
51pub use batching_mode::utils::{
52    IncrementalAggregateAnalysis, IncrementalAggregateMergeColumn, IncrementalAggregateMergeOp,
53    analyze_incremental_aggregate_plan, sql_to_df_plan,
54};
55pub(crate) use engine::{CreateFlowArgs, FlowId, TableName};
56pub use error::{Error, Result};
57pub use server::{FlownodeBuilder, FlownodeInstance, FlownodeServer, FlownodeServiceBuilder};
58
59pub use crate::adapter::FlownodeOptions;