databend icon indicating copy to clipboard operation
databend copied to clipboard

ClickHouse http handler cannot report runtime error

Open leiysky opened this issue 2 years ago • 2 comments

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.

leiysky avatar Aug 04 '22 15:08 leiysky

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

  1. return error like clickhouse.
  2. get and parse error from clickhouse-sqlachelmy for logic test.

youngsofun avatar Aug 04 '22 15:08 youngsofun

  1. 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.

leiysky avatar Aug 04 '22 15:08 leiysky

fixed by https://github.com/datafuselabs/databend/pull/7019

youngsofun avatar Sep 27 '22 08:09 youngsofun