1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright Materialize, Inc. and contributors. All rights reserved.
//
// Use of this software is governed by the Business Source License
// included in the LICENSE file.
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0.

//! The types for the dataflow crate.
//!
//! These are extracted into their own crate so that crates that only depend
//! on the interface of the dataflow crate, and not its implementation, can
//! avoid the dependency, as the dataflow crate is very slow to compile.

pub mod client;
pub mod logging;
pub mod plan;
pub mod reconciliation;

mod errors;
mod explain;
mod types;

pub use errors::*;
pub use explain::DataflowGraphFormatter;
pub use explain::Explanation;
pub use explain::JsonViewFormatter;
pub use explain::TimestampExplanation;
pub use explain::TimestampSource;
pub use plan::Plan;
pub use types::*;

use differential_dataflow::operators::arrange::TraceAgent;
use differential_dataflow::trace::implementations::ord::{OrdKeySpine, OrdValSpine};

use mz_repr::{Diff, Row, Timestamp};

pub type RowSpine<K, V, T, R, O = usize> = OrdValSpine<K, V, T, R, O>;
pub type ErrSpine<K, T, R, O = usize> = OrdKeySpine<K, T, R, O>;

pub type TraceRowHandle<K, V, T, R> = TraceAgent<RowSpine<K, V, T, R>>;
pub type TraceErrHandle<K, T, R> = TraceAgent<ErrSpine<K, T, R>>;
pub type KeysValsHandle = TraceRowHandle<Row, Row, Timestamp, Diff>;
pub type ErrsHandle = TraceErrHandle<DataflowError, Timestamp, Diff>;