20.10.1.4853

```sql
drop table if exists xp;
drop table if exists xp_d;

create table xp(A Date, B Int64, S String) Engine=MergeTree partition by toYYYYMM(A) order by B;
insert into xp select '2020-01-01', number , '' from numbers(100000);
insert into xp select '2020-10-01', number , '' from numbers(100000);
create table xp_d as xp Engine=Distributed(test_shard_localhost, currentDatabase(), xp);

select count() from xp_d prewhere toYYYYMM(A) global in (select toYYYYMM(min(A)) from xp_d) where B > -1;
┌─count()─┐
│       0 │     <------ expected 100000
└─────────┘

-- global in & both predicates in prewhere 
select count() from xp_d prewhere toYYYYMM(A) global in (select toYYYYMM(min(A)) from xp_d) and B > -1;
┌─count()─┐
│  100000 │
└─────────┘

-- global in & both predicates in where 
select count() from xp_d where toYYYYMM(A) global in (select toYYYYMM(min(A)) from xp_d) and B > -1;
┌─count()─┐
│  100000 │
└─────────┘

-- not global
select count() from xp_d prewhere toYYYYMM(A) in (select toYYYYMM(min(A)) from xp_d) where B > -1;
┌─count()─┐
│  100000 │
└─────────┘



select count() from xp_d prewhere toYYYYMM(A) global in (select 202001) where B > -1;
┌─count()─┐
│       0 │
└─────────┘
```

hmm, it worked in 19.13.7.57
{
                QueryPlanStepPtr array_join_step = std::make_unique<ArrayJoinStep>(
                        query_plan.getCurrentDataStream(),
                        expressions.array_join);
                array_join_step->setStepDescription("ARRAY JOIN");
                query_plan.addStep(std::move(array_join_step));
            }
            if (expressions.before_join)
            {
                QueryPlanStepPtr before_join_step = std::make_unique<ExpressionStep>(
                    query_plan.getCurrentDataStream(),
                    expressions.before_join);
                before_join_step->setStepDescription("Before JOIN");
                query_plan.addStep(std::move(before_join_step));
            }
            if (expressions.hasJoin())
            {
                Block join_result_sample;
                JoinPtr join = expressions.join;
                join_result_sample = JoiningTransform::transformHeader(
                    query_plan.getCurrentDataStream().header, expressions.join);
                QueryPlanStepPtr join_step = std::make_unique<JoinStep>(
                    query_plan.getCurrentDataStream(),
                    expressions.join);
                join_step->setStepDescription("JOIN");
                query_plan.addStep(std::move(join_step));
                if (expressions.join_has_delayed_stream)
                {
                    auto stream = std::make_shared<LazyNonJoinedBlockInputStream>(*join, join_result_sample, settings.max_block_size);
                    auto source = std::make_shared<SourceFromInputStream>(std::move(stream));