**Describe what's wrong**

Including a LowCardinality column in an `ON` clause containing an `OR` operator results in this exception:

```
DB::Exception: Expected ColumnLowCardinality, got String: While executing JoiningTransform. (ILLEGAL_COLUMN)
```

**Does it reproduce on recent release?**

22.1.2

**How to reproduce**

Minimal repro case:

```sql
WITH t1 AS
    (
        SELECT toLowCardinality('x') AS col
    )
SELECT *
FROM t1
INNER JOIN t1 AS t2 ON (t1.col = t2.col) OR (t1.col = t2.col)
```

However, casting to String works:

```sql
WITH t1 AS
    (
        SELECT toLowCardinality('x') AS col
    )
SELECT *
FROM t1
INNER JOIN t1 AS t2 ON (CAST(t1.col AS String) = CAST(t2.col AS String)) OR (CAST(t1.col AS String) = CAST(t2.col AS String))
```

Without `OR`, casting is not necessary:

```sql
WITH t1 AS
    (
        SELECT toLowCardinality('x') AS col
    )
SELECT *
FROM t1
INNER JOIN t1 AS t2 ON t1.col = t2.col
```

**Expected behavior**

It should not be necessary to use CAST when joining on a LowCardinality column with multiple `OR` expressions.
block = block.cloneWithColumns(std::move(dst_columns));
}
DataTypePtr HashJoin::joinGetCheckAndGetReturnType(const DataTypes & data_types, const String & column_name, bool or_null) const
{
    size_t num_keys = data_types.size();
    if (right_table_keys.columns() != num_keys)
        throw Exception(
            "Number of arguments for function joinGet" + toString(or_null ? "OrNull" : "")
                + " doesn't match: passed, should be equal to " + toString(num_keys),
            ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH);
    for (size_t i = 0; i < num_keys; ++i)
    {
        const auto & left_type_origin = data_types[i];
        const auto & [c2, right_type_origin, right_name] = right_table_keys.safeGetByPosition(i);
        auto left_type = removeNullable(recursiveRemoveLowCardinality(left_type_origin));
        auto right_type = removeNullable(recursiveRemoveLowCardinality(right_type_origin));
        if (!left_type->equals(*right_type))
            throw Exception(
                "Type mismatch in joinGet key " + toString(i) + ": found type " + left_type->getName() + ", while the needed type is "
                    + right_type->getName(),
                ErrorCodes::TYPE_MISMATCH);
    }
    if (!sample_block_with_columns_to_add.has(column_name))
        throw Exception("StorageJoin doesn't contain column " + column_name, ErrorCodes::NO_SUCH_COLUMN_IN_TABLE);
    auto elem = sample_block_with_columns_to_add.getByName(column_name);
    if (or_null)
        elem.type = makeNullable(elem.type);
    return elem.type;
}
ColumnWithTypeAndName HashJoin::joinGet(const Block & block, const Block & block_with_columns_to_add) const