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

[CH-367] fix CH will continue to execute after JNI call fail #368

Open
wants to merge 766 commits into
base: clickhouse_backend
Choose a base branch
from

Conversation

shuai-xu
Copy link

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in official stable or prestable release)

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

This pr fix the problem invoked by #305 , if don't throw CH exception, CH will continue to execute after JNI call failed. So it should throw a Clickhouse Exception with the JNI exception message so the root cause will be shown in spark.

It close #367 .

Felixoid and others added 30 commits April 4, 2022 14:15
…ash_v2

One more try to resurrect build hash
Backport ClickHouse#35733 to 22.3: Added settings for insert of invalid IPv6, IPv4 values
Backport ClickHouse#35820 to 22.3: Avoid processing per-column TTL multiple times
- Allow define version as file
- Add inline cache
- Fix auto_release_type function
loneylee and others added 8 commits March 23, 2023 14:36
Support full join with join condition

Co-authored-by: shuai.li <shuai.li@kyligence.io>
Support Decimal type in Gluten 
Co-authored-by: shuai.li <shuai.li@kyligence.io>
…like Column 'deviceid' is not presented in input data (Kyligence#388)
Co-authored-by: shuai.li <shuai.li@kyligence.io>
Co-authored-by: shuai.li <shuai.li@kyligence.io>
@liuneng1994
Copy link
Collaborator

test this please

const char *nmsg = (env)->GetStringUTFChars(jmsg, NULL);\
std::string msg = std::string(nmsg);\
env->ReleaseStringUTFChars(jmsg, nmsg);\
throw DB::Exception(DB::ErrorCodes::LOGICAL_ERROR, msg);\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个错误编码缺少定义

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, It's a little strange that It can compile pass without define it external in my local machine.

(env)->ExceptionClear();\
jclass cls = (env)->GetObjectClass(excp); \
jmethodID mid = env->GetMethodID(cls, "toString","()Ljava/lang/String;");\
jstring jmsg = static_case<jstring>((env)->CallObjectMethod(excp, mid));\
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static_cast?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@lwz9103 lwz9103 force-pushed the clickhouse_backend branch 2 times, most recently from dc60d55 to 8066113 Compare May 26, 2023 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clickhouse continue to execute when JNI call throw exception