Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdk-impala: handle decorate operation errors #2975

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

DeltaMichael
Copy link
Contributor

@DeltaMichael DeltaMichael commented Dec 14, 2023

Why?

Due to logic in vdk-core, the managed cursor tries to execute all implementations of the db_connection_decoreate_operation hook. This happens even if it's not the correct cursor, e.g. an oracle cursor might try to execute impala queries. This case is handled in other plugins by wrapping the decorator in a try/catch block. However, the job should fail if the default db type is impala and the actual error is an impala error and not coming from some other cursor.

What?

Check the db_default_type config if an exception occurs in the decorator. If the db_default type is not impala, output an error log. If the db_default type is impala, re-throw the error

How was this tested?

Tested locally
CI

What kind of change is this?

Bugfix

Follow-up

#2973

Why?

Due to logic in vdk-core, the managed cursor tries to
execute all implementations of the db_connection_decoreate_operation hook.

This happens even if it's not the correct cursor, e.g. an oracle cursor might
try to execute impala queries.

This case is handled in other plugins by wrapping the decorator in
a try/catch block. However, the job should fail if the default db type
is impala and the actual error is an impala error and not coming from
some other cursor.

What?

Check the db_default_type config if an exception occurs in the decorator.
If the db_default type is not impala, output an error log.
If the db_default type is impala, re-throw the error

How was this tested?

Tested locally
CI

What kind of change is this?

Bugfix

Signed-off-by: Dilyan Marinov <[email protected]>
@DeltaMichael DeltaMichael force-pushed the person/mdilyan/impala-handle-decorate-error branch from aed2a33 to 68d7552 Compare December 15, 2023 08:12
@DeltaMichael DeltaMichael merged commit c8b7bba into main Dec 15, 2023
8 checks passed
@DeltaMichael DeltaMichael deleted the person/mdilyan/impala-handle-decorate-error branch December 15, 2023 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants