-
Notifications
You must be signed in to change notification settings - Fork 17
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-402]Enable return null and complex type for get_json_object function #403
[CH-402]Enable return null and complex type for get_json_object function #403
Conversation
Can one of the admins verify this patch? |
if (function_name == "JSON_VALUE") | ||
{ | ||
context->setSetting("function_json_value_return_type_allow_complex", true); | ||
context->setSetting("function_json_value_return_type_allow_nullable", true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么要在这个位置修改配置。。不可以在最开始的时候配置好吗。在解析计划的时候修改context似乎不太合理
@@ -17,7 +17,7 @@ struct NativeAllocatorContext | |||
{ | |||
std::shared_ptr<DB::CurrentThread::QueryScope> query_scope; | |||
std::shared_ptr<DB::ThreadStatus> thread_status; | |||
DB::ContextPtr query_context; | |||
DB::ContextMutablePtr query_context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不应该在这里修改context
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
8666231
to
03b43bb
Compare
Fixed done @liuneng1994 |
test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Enable return null and complex type for get_json_object function. By adapt to 2 settings
function_json_value_return_type_allow_nullable
andfunction_json_value_return_type_allow_complex
as introduced in pr : ClickHouse#47494. The issue is described in #402