-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode_defs.py
43 lines (37 loc) · 905 Bytes
/
node_defs.py
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
from enum import Enum
class JoinType(Enum):
INNER = 1
LEFT = 2
RIGHT = 3
FULL = 4
class RTEType(Enum):
RELATION = 1
SUBQUERY = 2
CTE = 3
TABLEFUNC = 4
VALUES = 5
class RestrictOp(Enum):
LT = 1
GT = 2
EQ = 3
class CitusType(Enum):
DISTRIBUTED = 1
REFERENCE = 2
POSTGRES = 3
class Table:
def __init__(self, name, citusType, maxCount,
rowCount, nullRate, duplicateRate,
useRandom, columns, dupCount):
self.name = name
self.citusType = citusType
self.maxCount = maxCount
self.rowCount = rowCount
self.nullRate = nullRate
self.duplicateRate = duplicateRate
self.useRandom = useRandom
self.columns = columns
self.dupCount = dupCount
class Column:
def __init__(self, name, type):
self.name = name
self.type = type