13struct ExecutionContext;
75class PhysicalOperator;
117 virtual bool isSink()
const {
return false; }
135 common::Profiler& profiler)
const;
140 virtual std::unique_ptr<PhysicalOperator>
copy() = 0;
144 template<
class TARGET>
148 template<
class TARGET>
#define KUZU_API
Definition api.h:25
Definition physical_operator.h:94
std::string getNumTupleMetricKey() const
Definition physical_operator.h:160
PhysicalOperatorType operatorType
Definition physical_operator.h:172
virtual void initGlobalStateInternal(ExecutionContext *)
Definition physical_operator.h:154
virtual bool isSource() const
Definition physical_operator.h:116
physical_op_vector_t children
Definition physical_operator.h:174
void initGlobalState(ExecutionContext *context)
virtual void finalize(ExecutionContext *context)
virtual void finalizeInternal(ExecutionContext *)
Definition physical_operator.h:167
virtual bool getNextTuplesInternal(ExecutionContext *context)=0
std::unique_ptr< PhysicalOperator > moveUnaryChild()
virtual ~PhysicalOperator()=default
virtual double getProgress(ExecutionContext *context) const
TARGET * ptrCast()
Definition physical_operator.h:145
const OPPrintInfo * getPrintInfo() const
Definition physical_operator.h:138
physical_op_id id
Definition physical_operator.h:170
virtual void initLocalStateInternal(ResultSet *, ExecutionContext *)
Definition physical_operator.h:155
std::unordered_map< std::string, std::string > getProfilerKeyValAttributes(common::Profiler &profiler) const
physical_op_id getOperatorID() const
Definition physical_operator.h:112
void registerProfilingMetrics(common::Profiler *profiler)
bool getNextTuple(ExecutionContext *context)
const TARGET & constCast()
Definition physical_operator.h:149
PhysicalOperator * getChild(common::idx_t idx) const
Definition physical_operator.h:121
virtual bool isSink() const
Definition physical_operator.h:117
std::vector< std::string > getProfilerAttributes(common::Profiler &profiler) const
double getExecutionTime(common::Profiler &profiler) const
PhysicalOperatorType getOperatorType() const
Definition physical_operator.h:114
PhysicalOperator(PhysicalOperatorType operatorType, std::unique_ptr< PhysicalOperator > left, std::unique_ptr< PhysicalOperator > right, physical_op_id id, std::unique_ptr< OPPrintInfo > printInfo)
PhysicalOperator(PhysicalOperatorType operatorType, physical_op_vector_t children, physical_op_id id, std::unique_ptr< OPPrintInfo > printInfo)
std::unique_ptr< OperatorMetrics > metrics
Definition physical_operator.h:171
std::string getTimeMetricKey() const
Definition physical_operator.h:159
virtual bool isParallel() const
Definition physical_operator.h:118
common::idx_t getNumChildren() const
Definition physical_operator.h:122
ResultSet * resultSet
Definition physical_operator.h:175
PhysicalOperator(PhysicalOperatorType operatorType, physical_op_id id, std::unique_ptr< OPPrintInfo > printInfo)
Definition physical_operator.h:97
virtual std::unique_ptr< PhysicalOperator > copy()=0
uint64_t getNumOutputTuples(common::Profiler &profiler) const
void addChild(std::unique_ptr< PhysicalOperator > op)
Definition physical_operator.h:120
void initLocalState(ResultSet *resultSet, ExecutionContext *context)
std::unique_ptr< OPPrintInfo > printInfo
Definition physical_operator.h:176
bool hasBeenFinalized
Definition physical_operator.h:178
PhysicalOperator(PhysicalOperatorType operatorType, std::unique_ptr< PhysicalOperator > child, physical_op_id id, std::unique_ptr< OPPrintInfo > printInfo)
Definition physical_operator.h:76
static std::string operatorToString(const PhysicalOperator *physicalOp)
Definition result_set.h:12
Definition array_utils.h:7
uint32_t idx_t
Definition types.h:45
TO ku_dynamic_cast(FROM *old)
Definition cast.h:11
Definition client_context.h:38
std::vector< std::unique_ptr< PhysicalOperator > > physical_op_vector_t
Definition physical_operator.h:92
uint32_t physical_op_id
Definition physical_operator.h:15
PhysicalOperatorType
Definition physical_operator.h:17
@ ATTACH_DATABASE
Definition physical_operator.h:22
@ SEMI_MASKER
Definition physical_operator.h:59
@ EMPTY_RESULT
Definition physical_operator.h:34
@ TOP_K_SCAN
Definition physical_operator.h:65
@ LOAD_EXTENSION
Definition physical_operator.h:47
@ COPY_TO
Definition physical_operator.h:24
@ ORDER_BY
Definition physical_operator.h:67
@ INTERSECT
Definition physical_operator.h:44
@ MULTIPLICITY_REDUCER
Definition physical_operator.h:49
@ AGGREGATE
Definition physical_operator.h:19
@ UNWIND
Definition physical_operator.h:71
@ ORDER_BY_SCAN
Definition physical_operator.h:69
@ CREATE_MACRO
Definition physical_operator.h:25
@ LIMIT
Definition physical_operator.h:46
@ TABLE_FUNCTION_CALL
Definition physical_operator.h:63
@ INSTALL_EXTENSION
Definition physical_operator.h:45
@ CROSS_PRODUCT
Definition physical_operator.h:29
@ PROFILE
Definition physical_operator.h:54
@ RESULT_COLLECTOR
Definition physical_operator.h:56
@ PATH_PROPERTY_PROBE
Definition physical_operator.h:51
@ INDEX_LOOKUP
Definition physical_operator.h:41
@ SET_PROPERTY
Definition physical_operator.h:60
@ INSERT
Definition physical_operator.h:42
@ FLATTEN
Definition physical_operator.h:37
@ SCAN_NODE_TABLE
Definition physical_operator.h:57
@ ORDER_BY_MERGE
Definition physical_operator.h:68
@ PARTITIONER
Definition physical_operator.h:50
@ PRIMARY_KEY_SCAN_NODE_TABLE
Definition physical_operator.h:52
@ BATCH_INSERT
Definition physical_operator.h:23
@ HASH_JOIN_BUILD
Definition physical_operator.h:38
@ STANDALONE_CALL
Definition physical_operator.h:62
@ DELETE_
Definition physical_operator.h:31
@ MERGE
Definition physical_operator.h:48
@ CREATE_TABLE
Definition physical_operator.h:27
@ UNION_ALL_SCAN
Definition physical_operator.h:70
@ AGGREGATE_FINALIZE
Definition physical_operator.h:20
@ DUMMY_SINK
Definition physical_operator.h:33
@ TOP_K
Definition physical_operator.h:64
@ CREATE_SEQUENCE
Definition physical_operator.h:26
@ SKIP
Definition physical_operator.h:61
@ USE_DATABASE
Definition physical_operator.h:72
@ CREATE_TYPE
Definition physical_operator.h:28
@ DROP
Definition physical_operator.h:32
@ INTERSECT_BUILD
Definition physical_operator.h:43
@ HASH_JOIN_PROBE
Definition physical_operator.h:39
@ EXPORT_DATABASE
Definition physical_operator.h:35
@ IMPORT_DATABASE
Definition physical_operator.h:40
@ DETACH_DATABASE
Definition physical_operator.h:30
@ RECURSIVE_EXTEND
Definition physical_operator.h:55
@ SCAN_REL_TABLE
Definition physical_operator.h:58
@ TRANSACTION
Definition physical_operator.h:66
@ ALTER
Definition physical_operator.h:18
@ FILTER
Definition physical_operator.h:36
@ AGGREGATE_SCAN
Definition physical_operator.h:21
@ PROJECTION
Definition physical_operator.h:53
Definition array_utils.h:7
Definition operator_print_info.h:8
OperatorMetrics(common::TimeMetric &executionTime, common::NumericMetric &numOutputTuple)
Definition physical_operator.h:88
common::TimeMetric & executionTime
Definition physical_operator.h:85
common::NumericMetric & numOutputTuple
Definition physical_operator.h:86