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

Function checkTypesOfKeys

src/Interpreters/JoinUtils.cpp:390–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void checkTypesOfKeys(const Block & block_left, const Names & key_names_left,
391 const Block & block_right, const Names & key_names_right)
392{
393 size_t keys_size = key_names_left.size();
394
395 for (size_t i = 0; i < keys_size; ++i)
396 {
397 DataTypePtr left_type = removeNullable(recursiveRemoveLowCardinality(block_left.getByName(key_names_left[i]).type));
398 DataTypePtr right_type = removeNullable(recursiveRemoveLowCardinality(block_right.getByName(key_names_right[i]).type));
399
400 if (!left_type->equals(*right_type))
401 {
402 throw DB::Exception(
403 ErrorCodes::TYPE_MISMATCH,
404 "Type mismatch of columns to JOIN by: {} :: {} at left, {} :: {} at right",
405 key_names_left[i], left_type->getName(),
406 key_names_right[i], right_type->getName());
407 }
408 }
409}
410
411void checkTypesOfKeys(const Block & block_left, const Names & key_names_left, const String & condition_name_left,
412 const Block & block_right, const Names & key_names_right, const String & condition_name_right)

Callers 6

checkTypesOfKeysMethod · 0.85
checkTypesOfKeysMethod · 0.85
joinBlockMethod · 0.85
checkTypesOfKeysMethod · 0.85
joinBlockMethod · 0.85
joinScatteredBlockMethod · 0.85

Calls 8

checkTypesOfMasksFunction · 0.85
getByNameMethod · 0.80
ExceptionClass · 0.70
removeNullableFunction · 0.50
sizeMethod · 0.45
equalsMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected