#27685
const Block & block_right, const Names & key_names_right)
{
    size_t keys_size = key_names_left.size();
    for (size_t i = 0; i < keys_size; ++i)
    {
        DataTypePtr left_type = removeNullable(recursiveRemoveLowCardinality(block_left.getByName(key_names_left[i]).type));
        DataTypePtr right_type = removeNullable(recursiveRemoveLowCardinality(block_right.getByName(key_names_right[i]).type));
        if (!left_type->equals(*right_type))
            throw Exception("Type mismatch of columns to JOIN by: "
                            + key_names_left[i] + " " + left_type->getName() + " at left, "
                            + key_names_right[i] + " " + right_type->getName() + " at right",
                            ErrorCodes::TYPE_MISMATCH);
    }
}
void checkTypesOfKeys(const Block & block_left, const Names & key_names_left, const String & condition_name_left,
                      const Block & block_right, const Names & key_names_right, const String & condition_name_right)
{
    checkTypesOfKeys(block_left, key_names_left,block_right,key_names_right);
    checkTypesOfMasks(block_left, condition_name_left, block_right, condition_name_right);
}
void checkTypesOfMasks(const Block & block_left, const String & condition_name_left,