MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / strictEquals

Method strictEquals

src/DataTypes/DataTypeAggregateFunction.cpp:172–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172bool 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
203void DataTypeAggregateFunction::updateHashImpl(SipHash & hash) const
204{

Callers

nothing calls this directly

Calls 5

getMethod · 0.45
getStateVariantMethod · 0.45
getNameMethod · 0.45
sizeMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected