**Describe what's wrong**

Record with a JSON column seems to not be deleted correctly.

**Does it reproduce on recent release?**

Yes

**How to reproduce**

First let's create the table with a JSON column.

```
CREATE TABLE testJson
(
    `id` UInt32,
    `fields` JSON
)
ENGINE = ReplicatedMergeTree
ORDER BY id
SETTINGS index_granularity = 8192
```

Let's add a row to the table:

```
INSERT INTO testJson  (id, fields) VALUES (1,'{"fieldInteger":1,"fieldBoolean":true,"fieldFloat":1.23,"fieldString":"StringValue"}');
```

Let's check that the row has been properly inserted.

```
SELECT *
FROM testJson

Query id: 62875aa8-67fc-46ee-80b3-382346bbf255

┌─id─┬─fields───────────────────┐
│  1 │ (1,1.23,1,'StringValue') │
└────┴──────────────────────────┘

1 row in set. Elapsed: 0.158 sec.
```

Then I delete the element

```
ALTER TABLE testJson
    DELETE WHERE id = 1

Query id: 288c33ed-75c4-42fc-ac04-bbce2cc325e3

┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
│ default|host-1 │      0 │       │                   1 │                1 │
└───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘
┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
│ default|host-2 │      0 │       │                   0 │                0 │
└───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘

2 rows in set. Elapsed: 0.366 sec.
```

Let's verify that the record has been deleted:

```
SELECT *
FROM testJson

Query id: 62875aa8-67fc-46ee-80b3-382346bbf255

┌─id─┬─fields───────────────────┐
│  1 │ (1,1.23,1,'StringValue') │
└────┴──────────────────────────┘

1 row in set. Elapsed: 0.158 sec.
```

The record is still there. 

**Expected behavior**

The row should have been deleted like in the below example:

```
CREATE TABLE testString
(
    `id` UInt32,
    `fields` String
)
ENGINE = ReplicatedMergeTree
ORDER BY id
SETTINGS index_granularity = 8192
```

Let's insert a row:

```
INSERT INTO testString  (id, fields) VALUES (1,'test');
```

Let's check that the record is there:

```
SELECT *
FROM testString

Query id: b2f8f509-3633-43fc-9be7-a797492df0bb

┌─id─┬─fields─┐
│  1 │ test   │
└────┴────────┘

1 rows in set. Elapsed: 0.202 sec.
```

Let's remove it:

```
ALTER TABLE testJson
    DELETE WHERE id = 1

Query id: 10ad5930-9102-4297-96c3-ae1fdef09d50

┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
│ default|host-1 │      0 │       │                   1 │                1 │
└───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘
┌─host──────────────────────────┬─status─┬─error─┬─num_hosts_remaining─┬─num_hosts_active─┐
│ default|host-2│      0 │       │                   0 │                0 │
└───────────────────────────────┴────────┴───────┴─────────────────────┴──────────────────┘

2 rows in set. Elapsed: 0.339 sec.
```

It's being deleted correctly:

```
SELECT *
FROM testString

Query id: fe3c0ea5-cc5a-41c0-be69-04c12d80cd93

Ok.

0 rows in set. Elapsed: 0.156 sec.
```
actions_chain.addStep();
            for (const auto & kv : stage.column_to_updated)
                stage.analyzer->appendExpression(actions_chain, kv.second, dry_run);
            auto & actions = actions_chain.getLastStep().actions();
            for (const auto & kv : stage.column_to_updated)
            {
                auto column_name = kv.second->getColumnName();
                const auto & dag_node = actions->findInIndex(column_name);
                const auto & alias = actions->addAlias(dag_node, kv.first);
                actions->addOrReplaceInIndex(alias);
            }
        }
        
        actions_chain.addStep();
        actions_chain.getLastStep().required_output.clear();
        ActionsDAG::NodeRawConstPtrs new_index;
        for (const auto & name : stage.output_columns)
            actions_chain.getLastStep().addRequiredOutput(name);
        actions_chain.getLastActions();
        actions_chain.finalize();
        
        for (const auto & column : actions_chain.steps.front()->getRequiredColumns())
            prepared_stages[i - 1].output_columns.insert(column.name);
    }
    
    auto select = std::make_shared<ASTSelectQuery>();
    select->setExpression(ASTSelectQuery::Expression::SELECT, std::make_shared<ASTExpressionList>());
    for (const auto & column_name : prepared_stages[0].output_columns)
        select->select()->children.push_back(std::make_shared<ASTIdentifier>(column_name));