**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.
total_bytes = getTotalByteCount();
        }
    }
    return table_join->sizeLimits().check(total_rows, total_bytes, "JOIN", ErrorCodes::SET_SIZE_LIMIT_EXCEEDED);
}
namespace
{
struct JoinOnKeyColumns
{
    Names key_names;
    Columns materialized_keys_holder;
    ColumnRawPtrs key_columns;
    ConstNullMapPtr null_map;
    ColumnPtr null_map_holder;
    
    JoinCommon::JoinMask join_mask_column;
    Sizes key_sizes;
    explicit JoinOnKeyColumns(const Block & block, const Names & key_names_, const String & cond_column_name, const Sizes & key_sizes_)
        : key_names(key_names_)
        , materialized_keys_holder(JoinCommon::materializeColumns(block, key_names)) 
        , key_columns(JoinCommon::getRawPointers(materialized_keys_holder))
        , null_map(nullptr)
        , null_map_holder(extractNestedColumnsAndNullMap(key_columns, null_map))
        , join_mask_column(JoinCommon::getColumnAsMask(block, cond_column_name))
        , key_sizes(key_sizes_)
    {
    }
    bool isRowFiltered(size_t i) const { return join_mask_column.isRowFiltered(i); }
};
class AddedColumns