https://s3.amazonaws.com/clickhouse-test-reports/42033/ebdfbf43db5e5eacaff81b4a3dd55c5a285ee025/fuzzer_astfuzzerasan//report.html
How to reproduce:
```
:) create table data_02295 (b Int64, a Int64, grp_aggreg AggregateFunction(groupArrayArray, Array(UInt64))) engine = MergeTree() order by a;
:) set allow_experimental_analyzer=1;
:) SELECT grp_aggreg FROM data_02295 WHERE JSONLength(grp_aggreg, 100, NULL) SETTINGS optimize_aggregation_in_order = 1;
```

CC: @kitaisreal 
const QueryTreeNodePtr & query_tree_,
    const ContextPtr & context_,
    const SelectQueryOptions & select_query_options_)
    : query(query_tree_->toAST())
    , context(Context::createCopy(context_))
    , select_query_options(select_query_options_)
    , query_tree(query_tree_)
    , planner(query_tree, select_query_options)
{
}
Block InterpreterSelectQueryAnalyzer::getSampleBlock()
{
    planner.buildQueryPlanIfNeeded();
    return planner.getQueryPlan().getCurrentDataStream().header;
}
BlockIO InterpreterSelectQueryAnalyzer::execute()
{
    planner.buildQueryPlanIfNeeded();
    auto & query_plan = planner.getQueryPlan();
    QueryPlanOptimizationSettings optimization_settings;
    BuildQueryPipelineSettings build_pipeline_settings;
    auto pipeline_builder = query_plan.buildQueryPipeline(optimization_settings, build_pipeline_settings);
    BlockIO result;
    result.pipeline = QueryPipelineBuilder::getPipeline(std::move(*pipeline_builder));
    if (!select_query_options.ignore_quota && (select_query_options.to_stage == QueryProcessingStage::Complete))
        result.pipeline.setQuota(context->getQuota());
    return result;
}
QueryPlan && InterpreterSelectQueryAnalyzer::extractQueryPlan() &&