The last line in `data` section of the output is always empty. 

```
# clickhouse-client
ClickHouse client version 20.5.2.7 (official build).
Connecting to localhost:9001 as user default.
Connected to ClickHouse server version 20.5.2 revision 54435.

sas-vrxctd96rqw5lw25.db.yandex.net :) select 1 format JSON

SELECT 1
FORMAT JSON

{
	"meta":
	[
		{
			"name": "1",
			"type": "UInt8"
		}
	],

	"data":
	[
		{
			"1": 1

	],

	"rows": 1,

	"statistics":
	{
		"elapsed": 0.00019223,
		"rows_read": 1,
		"bytes_read": 1
	}
}

```

The issue appears only in interactive mode. In non-interactive mode clickhouse-client produces the correct output:

```
# clickhouse-client -q 'select 1 format JSON'
{
	"meta":
	[
		{
			"name": "1",
			"type": "UInt8"
		}
	],

	"data":
	[
		{
			"1": 1
		}
	],

	"rows": 1,

	"statistics":
	{
		"elapsed": 0.000220845,
		"rows_read": 1,
		"bytes_read": 1
	}
}
``` 

std::optional<Settings> old_settings
            SCOPE_EXIT({ if (old_settings) context.setSettings(*old_settings) )
            auto apply_query_settings = [&](const IAST & settings_ast)
            {
                if (!old_settings)
                    old_settings.emplace(context.getSettingsRef())
                context.applySettingsChanges(settings_ast.as<ASTSetQuery>()->changes)
            
            const auto * insert = parsed_query->as<ASTInsertQuery>()
            if (insert && insert->settings_ast)
                apply_query_settings(*insert->settings_ast)
            /// FIXME: try to prettify this st using `as<>()`
            const auto * ith_output = dynamic_st<const ASTQueryWithOutput *>(parsed_query.get())
            if (ith_output && ith_output->settings_ast)
                apply_query_settings(*ith_output->settings_ast)
            connection->forceConnected(connection_parameters.timeouts)
            ASTPtr input_function
            if (insert && insert->select)
                insert->tryFindInputFunction(input_function)
            /// INSERT query for hich da transfer is needed (not an INSERT SELECT or input()) is processed separately.
            if (insert && (!insert->select || input_function) && !insert->atch)
            {
                if (input_function && insert->format.empty())
                    thro Exception("FORMAT must be specified for function input()", ErrorCodes::INVALID_USAGE_OF_INPUT)
                processInsertQuery()
            
            else
                processOrdinaryQuery()
        
        /// Do not change context (current DB, settings) in se of an exception.