-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjection.h
More file actions
executable file
·46 lines (36 loc) · 998 Bytes
/
Projection.h
File metadata and controls
executable file
·46 lines (36 loc) · 998 Bytes
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
46
#ifndef PROJECTION_H_
#define PROJECTION_H_
#include <iostream>
#include <vector>
#include "IRelationalOperator.h"
#include "Schema.h"
#include "Tuple.h"
#include "Column.h"
typedef Columns ProjectionList;
class Projection : public IRelationalOperator
{
private:
enum { IN = 0, OUT = 1 };
/** minimum space required to store tuple. */
int m_rsize;
/** flag to check if all data from current buffer has been consumed. */
bool m_consumed;
/** next record id to consume. */
int m_next;
MemoryBlock * m_buffer[2];
IRelationalOperator * m_child;
Tuple m_tuple;
byte * m_data;
Schema * m_schema;
public:
Projection(IRelationalOperator * op, ProjectionList & projList);
~Projection();
virtual const Schema * schema() const;
virtual bool moveNext();
virtual void next(MemoryBlock &);
virtual void reset() {}
virtual void dump(std::ostream & strm,
char fs = '|', char rs = '\n');
virtual void layout(const MaterializationLayout *) { }
};
#endif