MCPcopy Create free account
hub / github.com/BlazingDB/blazingsql / is_binary_operator

Function is_binary_operator

engine/src/parser/expression_utils.cpp:71–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71bool is_binary_operator(operator_type op) {
72 switch (op)
73 {
74 case operator_type::BLZ_ADD:
75 case operator_type::BLZ_SUB:
76 case operator_type::BLZ_MUL:
77 case operator_type::BLZ_DIV:
78 case operator_type::BLZ_MOD:
79 case operator_type::BLZ_POW:
80 case operator_type::BLZ_ROUND:
81 case operator_type::BLZ_EQUAL:
82 case operator_type::BLZ_NOT_EQUAL:
83 case operator_type::BLZ_LESS:
84 case operator_type::BLZ_GREATER:
85 case operator_type::BLZ_LESS_EQUAL:
86 case operator_type::BLZ_GREATER_EQUAL:
87 case operator_type::BLZ_BITWISE_AND:
88 case operator_type::BLZ_BITWISE_OR:
89 case operator_type::BLZ_BITWISE_XOR:
90 case operator_type::BLZ_LOGICAL_AND:
91 case operator_type::BLZ_LOGICAL_OR:
92 case operator_type::BLZ_FIRST_NON_MAGIC:
93 case operator_type::BLZ_MAGIC_IF_NOT:
94 case operator_type::BLZ_STR_LIKE:
95 case operator_type::BLZ_STR_CONCAT:
96 case operator_type::BLZ_STR_LEFT:
97 case operator_type::BLZ_STR_RIGHT:
98 case operator_type::BLZ_IS_NOT_DISTINCT_FROM:
99 return true;
100 case operator_type::BLZ_STR_SUBSTRING:
101 case operator_type::BLZ_STR_REPLACE:
102 case operator_type::BLZ_TO_DATE:
103 case operator_type::BLZ_TO_TIMESTAMP:
104 case operator_type::BLZ_STR_TRIM:
105 case operator_type::BLZ_STR_REGEXP_REPLACE:
106 assert(false);
107 // Ternary operator. Should not reach here
108 // Should be evaluated in place (inside function_evaluator_transformer) and removed from the tree
109 return true;
110 default:
111 return false;
112 }
113}
114
115cudf::type_id get_output_type(operator_type op) {
116 switch (op)

Callers 2

in_orderFunction · 0.85
visitMethod · 0.85

Calls 1

assertFunction · 0.85

Tested by

no test coverage detected