| 170 | } |
| 171 | |
| 172 | void TableNode::updateTreeHashImpl(HashState & state, CompareOptions) const |
| 173 | { |
| 174 | if (!temporary_table_name.empty()) |
| 175 | { |
| 176 | state.update(temporary_table_name.size()); |
| 177 | state.update(temporary_table_name); |
| 178 | } |
| 179 | else |
| 180 | { |
| 181 | // In case of cross-replication we don't know what database is used for the table. |
| 182 | // `storage_id.hasDatabase()` can return false only on the initiator node. |
| 183 | // Each shard will use the default database (in the case of cross-replication shards may have different defaults). |
| 184 | auto full_name = storage_id.hasDatabase() ? storage_id.getFullNameNotQuoted() : storage_id.getTableName(); |
| 185 | state.update(full_name.size()); |
| 186 | state.update(full_name); |
| 187 | } |
| 188 | |
| 189 | if (table_expression_modifiers) |
| 190 | table_expression_modifiers->updateTreeHash(state); |
| 191 | |
| 192 | /// See note in `isEqualImpl`: parameterized-view calls reuse the same `StorageID`, so we mix in |
| 193 | /// the substituted inner query to keep distinct argument values hashing to distinct values. |
| 194 | if (auto inner_query = getParameterizedViewInnerQuery(storage)) |
| 195 | inner_query->updateTreeHash(state, /*ignore_aliases=*/false); |
| 196 | } |
| 197 | |
| 198 | QueryTreeNodePtr TableNode::cloneImpl() const |
| 199 | { |
nothing calls this directly
no test coverage detected