Open killme2008 opened 1 month ago
Returns the correct errors from DataFusion.
As mentioned in https://github.com/GreptimeTeam/greptimedb/pull/4362#discussion_r1677778154, maybe we can wrap the error into a BoxedError
before casting to the DataFusion error. Then we can always downcast the error into our BoxedError
. cc @shuiyisong
I want to have a try for PostgreSQL.
I want to have a try for PostgreSQL.
Cool, thank you.
@killme2008 I have a problem. Different from mysql crate, no type of PostgreSQL error codes found in pgwire crate. So in order to map StatusCode, I need to define enum PgWireErrorCode first?
enum PgWireErrorCode {
EC_00000,
EC_01000,
...
}
@killme2008 I have a problem. Different from mysql crate, no type of PostgreSQL error codes found in pgwire crate. So in order to map StatusCode, I need to define enum PgWireErrorCode first?
enum PgWireErrorCode { EC_00000, EC_01000, ... }
Yes, but i think you don't need to define all the pg error codes, but just the StatusCode needs.
https://greptimedb.rs/common_error/status_code/enum.StatusCode.html
Or maybe a function like fn status_code_to_pg_error(status: StatusCode) -> &str
is enough.
What type of enhancement is this?
API improvement
What does the enhancement do?
The error messages in GreptimeDB have some issues:
Internal
orUnknown
, causing the error message to not display correctly.Implementation challenges
Internal
orUnknown
.StatusCode
toErrorKind
StatusCode
to PostgreSQL error codesNo response