OoOJoin  0.0.1
The next generation of out-of-order join operator
Tuples.h
Go to the documentation of this file.
1 
2 //
3 // Created by tony on 22/11/22.
4 //
5 
6 #ifndef INTELLISTREAM_OOOTUPLE_H
7 #define INTELLISTREAM_OOOTUPLE_H
8 #include <stdint.h>
9 #include <string>
10 #include <memory>
11 namespace OoOJoin {
12 
18 typedef uint64_t keyType;
19 typedef uint64_t valueType;
20 typedef uint64_t tsType;
26 class Tuple {
27  public:
35  Tuple(keyType k);
41  Tuple(keyType k, valueType v);
48  Tuple(keyType k, valueType v, tsType et);
61  std::string toString();
62  ~Tuple() {}
63 };
68 typedef std::shared_ptr<class Tuple> TuplePtr;
73 #define newTuple std::make_shared<OoOJoin::Tuple>
79 class OoOTuple : public Tuple {
80  public:
86  OoOTuple(keyType k) : Tuple(k) {}
92  OoOTuple(keyType k, valueType v) : Tuple(k, v) { arrivalTime = 0; }
99  OoOTuple(keyType k, valueType v, tsType et) : Tuple(k, v, et) { arrivalTime = et; }
107  OoOTuple(keyType k, valueType v, tsType et, tsType at) : Tuple(k, v, et) { arrivalTime = at; }
112  std::string toString();
113  ~OoOTuple() {}
114 };
119 typedef std::shared_ptr<class OoOTuple> OoOTuplePtr;
124 #define newTuple std::make_shared<OoOJoin::Tuple>
131 class TrackTuple : public OoOTuple {
132  public:
133  tsType processedTime = 0;
151  TrackTuple(keyType k, valueType v, tsType et) : OoOTuple(k, v, et) {}
159  TrackTuple(keyType k, valueType v, tsType et, tsType at) : OoOTuple(k, v, et, at) {}
164  std::string toString();
165  ~TrackTuple() {}
166 };
171 typedef std::shared_ptr<class TrackTuple> TrackTuplePtr;
176 #define newTrackTuple std::make_shared<OoOJoin::TrackTuple>
180 // AlianceDB
181 
182 }
183 
184 #endif //INTELLISTREAM_OOOTUPLE_H
The class to describe a tuple, which allows out-of-order.
Definition: Tuples.h:79
std::string toString()
convert the tuple into std string
Definition: Tuples.cpp:26
OoOTuple(keyType k)
construct with key
Definition: Tuples.h:86
OoOTuple(keyType k, valueType v)
construct with key and value
Definition: Tuples.h:92
tsType arrivalTime
Definition: Tuples.h:81
OoOTuple(keyType k, valueType v, tsType et, tsType at)
construct with key, value ,eventTime and arrivalTime
Definition: Tuples.h:107
OoOTuple(keyType k, valueType v, tsType et)
construct with key, value and eventTime
Definition: Tuples.h:99
The class to describe a tuple, which allows out-of-order and tracking processed Time.
Definition: Tuples.h:131
std::string toString()
convert the tuple into std string
Definition: Tuples.cpp:33
TrackTuple(keyType k, valueType v, tsType et)
construct with key, value and eventTime
Definition: Tuples.h:151
TrackTuple(keyType k, valueType v, tsType et, tsType at)
construct with key, value ,eventTime and arrivalTime
Definition: Tuples.h:159
TrackTuple(keyType k, valueType v)
construct with key and value
Definition: Tuples.h:144
TrackTuple(keyType k)
construct with key
Definition: Tuples.h:138
The class to describe a normal tuple.
Definition: Tuples.h:26
keyType key
Definition: Tuples.h:28
tsType eventTime
Definition: Tuples.h:30
valueType payload
Definition: Tuples.h:29
std::string toString()
convert the tuple into std string
Definition: Tuples.cpp:19
Tuple(keyType k, valueType v, tsType et, tsType at)
construct with key, value ,eventTime and arrivalTime
Tuple(keyType k)
construct with key
Definition: Tuples.cpp:8
std::shared_ptr< class OoOTuple > OoOTuplePtr
The class to describe a shared pointer to OoOTuple.
Definition: Tuples.h:119
uint64_t keyType
Definition: Tuples.h:18
std::shared_ptr< class Tuple > TuplePtr
The class to describe a shared pointer to Tuple.
Definition: Tuples.h:68
uint64_t tsType
Definition: Tuples.h:20
std::shared_ptr< class TrackTuple > TrackTuplePtr
The class to describe a shared pointer to TrackTuple.
Definition: Tuples.h:171
uint64_t valueType
Definition: Tuples.h:19
Definition: OperatorTable.cpp:7