| 170 | } |
| 171 | |
| 172 | bool DataTypeAggregateFunction::strictEquals(const DataTypePtr & lhs_state_type, const DataTypePtr & rhs_state_type, bool ignore_variant) |
| 173 | { |
| 174 | const auto * lhs_state = typeid_cast<const DataTypeAggregateFunction *>(lhs_state_type.get()); |
| 175 | const auto * rhs_state = typeid_cast<const DataTypeAggregateFunction *>(rhs_state_type.get()); |
| 176 | |
| 177 | if (!lhs_state || !rhs_state) |
| 178 | return false; |
| 179 | |
| 180 | if (!ignore_variant && lhs_state->function->getStateVariant() != rhs_state->function->getStateVariant()) |
| 181 | return false; |
| 182 | |
| 183 | if (lhs_state->function->getName() != rhs_state->function->getName()) |
| 184 | return false; |
| 185 | |
| 186 | if (lhs_state->parameters.size() != rhs_state->parameters.size()) |
| 187 | return false; |
| 188 | |
| 189 | for (size_t i = 0; i < lhs_state->parameters.size(); ++i) |
| 190 | if (lhs_state->parameters[i] != rhs_state->parameters[i]) |
| 191 | return false; |
| 192 | |
| 193 | if (lhs_state->argument_types.size() != rhs_state->argument_types.size()) |
| 194 | return false; |
| 195 | |
| 196 | for (size_t i = 0; i < lhs_state->argument_types.size(); ++i) |
| 197 | if (!lhs_state->argument_types[i]->equals(*rhs_state->argument_types[i])) |
| 198 | return false; |
| 199 | |
| 200 | return true; |
| 201 | } |
| 202 | |
| 203 | void DataTypeAggregateFunction::updateHashImpl(SipHash & hash) const |
| 204 | { |
nothing calls this directly
no test coverage detected