
**Describe the bug**
TLPHaving of Sqlancer test

- log [link](https://clickhouse-test-reports.s3.yandex.net/22706/520f4f39eccfcc16491fbc58d9cb44856deb5f53/sqlancer_test/TLPHaving.err)
```
+ java -jar target/sqlancer-1.1.0.jar --num-threads 10 --timeout-seconds 300 --num-queries 1000 --username default --password '' clickhouse --oracle TLPHaving
+ tee /test_output/TLPHaving.out
java.lang.AssertionError: SELECT MAX(((t0.c0)=(t0.c0))), (MIN(t0.c0)) and ((- (COUNT((t0.c0) OR (t0.c0))))), t0.c0, (- (t0.c0)), MIN(t0.c0) FROM t0 GROUP BY t0.c0 HAVING MAX(((t0.c0)>(''))) UNION ALL SELECT MAX(((t0.c0)==(t0.c0))), (MIN(t0.c0)) and ((- (COUNT((t0.c0) OR (t0.c0))))), t0.c0, (- (t0.c0)), MIN(t0.c0) FROM t0 GROUP BY t0.c0 HAVING (NOT (MAX(((t0.c0)>(''))))) UNION ALL SELECT MAX(((t0.c0)=(t0.c0))), (MIN(t0.c0)) and ((- (COUNT((t0.c0) OR (t0.c0))))), t0.c0, (- (t0.c0)), MIN(t0.c0) FROM t0 GROUP BY t0.c0 HAVING ((MAX(((t0.c0)>('')))) IS NULL) SETTINGS aggregate_functions_null_for_empty=1, enable_optimize_predicate_expression=0;
	at sqlancer.common.query.SQLQueryAdapter.checkException(SQLQueryAdapter.java:100)
	at sqlancer.common.query.SQLQueryAdapter.executeAndGet(SQLQueryAdapter.java:131)
	at sqlancer.ComparatorHelper.getResultSetFirstColumnAsString(ComparatorHelper.java:54)
	at sqlancer.clickhouse.oracle.tlp.ClickHouseTLPHavingOracle.check(ClickHouseTLPHavingOracle.java:66)
	at sqlancer.ProviderAdapter.generateAndTestDatabase(ProviderAdapter.java:49)
	at sqlancer.Main$DBMSExecutor.run(Main.java:323)
	at sqlancer.Main$2.run(Main.java:507)
	at sqlancer.Main$2.runThread(Main.java:485)
	at sqlancer.Main$2.run(Main.java:475)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: ru.yandex.clickhouse.except.ClickHouseUnknownException: ClickHouse exception, code: 1002, host: localhost, port: 8123; localhost:8123 failed to respond
	at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.getException(ClickHouseExceptionSpecifier.java:91)
	at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:55)
	at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:24)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:633)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:117)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:100)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:95)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.executeQuery(ClickHouseStatementImpl.java:90)
	at sqlancer.common.query.SQLQueryAdapter.executeAndGet(SQLQueryAdapter.java:121)
	... 10 more
Caused by: org.apache.http.NoHttpResponseException: localhost:8123 failed to respond
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:141)
	at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
	at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
	at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
	at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
	at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
	at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
	at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
	at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
	at ru.yandex.clickhouse.ClickHouseStatementImpl.getInputStream(ClickHouseStatementImpl.java:614)
	... 15 more
```
+ lhs.dumpStructure() + "\n" + rhs.dumpStructure(), ErrorCodes::LOGICAL_ERROR);
        if (!actual.type->equals(*expected.type))
            return on_error("Block structure mismatch in " + context_description + " stream: different types:\n"
                + lhs.dumpStructure() + "\n" + rhs.dumpStructure(), ErrorCodes::LOGICAL_ERROR);
        if (!actual.column || !expected.column)
            continue;
        if (actual.column->getName() != expected.column->getName())
            return on_error("Block structure mismatch in " + context_description + " stream: different columns:\n"
                + lhs.dumpStructure() + "\n" + rhs.dumpStructure(), ErrorCodes::LOGICAL_ERROR);
        if (isColumnConst(*actual.column) && isColumnConst(*expected.column))
        {
            Field actual_value = assert_cast<const ColumnConst &>(*actual.column).getField();
            Field expected_value = assert_cast<const ColumnConst &>(*expected.column).getField();
            if (actual_value != expected_value)
                return on_error("Block structure mismatch in " + context_description + " stream: different values of constants, actual: "
                    + applyVisitor(FieldVisitorToString(), actual_value) + ", expected: " + applyVisitor(FieldVisitorToString(), expected_value),
                    ErrorCodes::LOGICAL_ERROR);
        }
    }
    return ReturnType(true);
}
bool blocksHaveEqualStructure(const Block & lhs, const Block & rhs)
{
    return checkBlockStructure<bool>(lhs, rhs, {});
}
void assertBlocksHaveEqualStructure(const Block & lhs, const Block & rhs, const std::string & context_description)
{
    checkBlockStructure<void>(lhs, rhs, context_description);
}
void getBlocksDifference(const Block & lhs, const Block & rhs, std::string & out_lhs_diff, std::string & out_rhs_diff)