| 167 | } |
| 168 | |
| 169 | bool FunctionNode::isEqualImpl(const IQueryTreeNode & rhs, CompareOptions /*compare_options*/) const |
| 170 | { |
| 171 | const auto & rhs_typed = assert_cast<const FunctionNode &>(rhs); |
| 172 | if (function_name != rhs_typed.function_name || isAggregateFunction() != rhs_typed.isAggregateFunction() |
| 173 | || isOrdinaryFunction() != rhs_typed.isOrdinaryFunction() || isWindowFunction() != rhs_typed.isWindowFunction() |
| 174 | || nulls_action != rhs_typed.nulls_action) |
| 175 | return false; |
| 176 | |
| 177 | /// is_operator is ignored here because it affects only AST formatting |
| 178 | |
| 179 | if (isResolved() != rhs_typed.isResolved()) |
| 180 | return false; |
| 181 | if (!isResolved()) |
| 182 | return true; |
| 183 | |
| 184 | auto lhs_result_type = getResultType(); |
| 185 | auto rhs_result_type = rhs.getResultType(); |
| 186 | |
| 187 | if (lhs_result_type && rhs_result_type && !lhs_result_type->equals(*rhs_result_type)) |
| 188 | return false; |
| 189 | if (lhs_result_type && !rhs_result_type) |
| 190 | return false; |
| 191 | if (!lhs_result_type && rhs_result_type) |
| 192 | return false; |
| 193 | |
| 194 | return true; |
| 195 | } |
| 196 | |
| 197 | void FunctionNode::updateTreeHashImpl(HashState & hash_state, CompareOptions /*compare_options*/) const |
| 198 | { |
nothing calls this directly
no test coverage detected