-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBOSSVeloxEngine.hpp
More file actions
65 lines (44 loc) · 1.6 KB
/
BOSSVeloxEngine.hpp
File metadata and controls
65 lines (44 loc) · 1.6 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#pragma once
#include "BridgeVelox.h"
#include <Expression.hpp>
#include <velox/common/memory/MemoryPool.h>
#include <memory>
#include <thread>
#include <unordered_map>
#ifdef _WIN32
extern "C" {
__declspec(dllexport) BOSSExpression* evaluate(BOSSExpression* e);
__declspec(dllexport) void reset();
}
#endif // _WIN32
// #define USE_NEW_TABLE_FORMAT
#define TAKE_OWNERSHIP_OF_TASK_POOLS // requires velox patch to Task.h
// #define DebugInfo
namespace boss::engines::velox {
class Engine {
public:
Engine(Engine&) = delete;
Engine& operator=(Engine&) = delete;
Engine(Engine&&) = default;
Engine& operator=(Engine&&) = delete;
Engine();
~Engine();
boss::Expression evaluate(boss::Expression&& e);
boss::Expression evaluate(boss::ComplexExpression&& e);
private:
std::unordered_map<std::thread::id, std::shared_ptr<facebook::velox::memory::MemoryPool>>
threadPools_;
int32_t maxThreads = 1;
int32_t numDrivers = 0; // overrides maxThreads if > 0
int32_t inputBatchNumSplits = 64;
int32_t inputBatchNumRows = 0; // overrides numSplits if > 0
int32_t internalBatchNumRows = 0;
int32_t minimumOutputBatchNumRows = 0;
bool hashAdaptivityEnabled = true;
PlanBuilder buildOperatorPipeline(ComplexExpression&& e,
std::vector<std::tuple<core::PlanNodeId, size_t, size_t>>& scanIds,
memory::MemoryPool& pool,
std::shared_ptr<core::PlanNodeIdGenerator>& planNodeIdGenerator,
int& tableCnt, int& joinCnt);
};
} // namespace boss::engines::velox