databend
databend copied to clipboard
ClickHouse http handler cannot report runtime error
For example:
create table t (a string);
insert into t values('abc');
select cast(a as int) from t; -- Error, cannot cast 'abc' into a integer
This query will throw error during execution, while poem
has started streaming result to client. Because of this, client cannot get a reasonable error message but will get a Connection reset
error.
it`s a known issue, https://github.com/datafuselabs/databend/issues/6262
I thought it happens in limited special cases, and is not blocking any other thing, so not fixed yet.
need to
- return error like clickhouse.
- get and parse error from clickhouse-sqlachelmy for logic test.
- get parse error from clickhouse-sqlachelmy for logic test.
This is the problem I encountered.
Sometime we need to match the error code in logic test. If there is a runtime error, then the error code will be different between ClickHouse handler and the other handlers.
I'll remove error code matching for the affected test cases to get rid of this issue for now.
fixed by https://github.com/datafuselabs/databend/pull/7019