-
Notifications
You must be signed in to change notification settings - Fork 0
/
SequentialScan.h
executable file
·47 lines (36 loc) · 999 Bytes
/
SequentialScan.h
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
47
#ifndef SEQUENTIAL_SCAN_H_
#define SEQUENTIAL_SCAN_H_
#include <vector>
#include <string>
#include "Table.h"
#include "FileDescriptor.h"
#include "IRelationalOperator.h"
#include "Attribute.h"
#include "Column.h"
#include "MemoryBlock.h"
#include "Clause.h"
#include "TupleStreamWriter.h"
class SequentialScan : public IRelationalOperator
{
private:
FileDescriptor * m_fd;
DiskPage * m_page;
int m_rid;
byte * m_data;
MemoryBlock * m_buffer;
Schema * m_schema;
WhereClause * m_clause;
Tuple m_tuple; // filtered tuple.
TupleStreamWriter * m_tsw;
public:
SequentialScan(const Table * relation, const std::string & alias,
const Columns &);
~SequentialScan();
void filter(BooleanExpression * expression, const std::vector<std::string> & filterColumns);
virtual const Schema * schema() const;
virtual void layout(const MaterializationLayout * layout);
virtual bool moveNext();
virtual void next(MemoryBlock & buffer);
virtual void reset();
};
#endif