-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Feature](json_functions) support json-keys #36411
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
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.
clang-tidy made some suggestions
} | ||
const char* l_raw = reinterpret_cast<const char*>(&ldata[l_off]); | ||
JsonbDocument* doc = JsonbDocument::createDocument(l_raw, l_size); | ||
if (UNLIKELY(!doc || !doc->getValue())) { |
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.
warning: boolean expression can be simplified by DeMorgan's theorem [readability-simplify-boolean-expr]
if (UNLIKELY(!doc || !doc->getValue())) {
^
Additional context
be/src/common/compiler_util.h:35: expanded from macro 'UNLIKELY'
#define UNLIKELY(expr) __builtin_expect(!!(expr), 0)
^
dst_arr.insert_default(); | ||
continue; | ||
} | ||
ObjectVal* obj = (ObjectVal*)obj_val; |
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.
warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
ObjectVal* obj = (ObjectVal*)obj_val; | |
auto* obj = (ObjectVal*)obj_val; |
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
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
...core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/JsonKeys.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/catalog/BuiltinScalarFunctions.java
Outdated
Show resolved
Hide resolved
run buildall |
TPC-H: Total hot run time: 39870 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 168698 ms
|
ClickBench: Total hot run time: 30.33 s
|
scalar(JsonKeys.class, "json_keys"), | ||
scalar(JsonKeys.class, "jsonb_keys"), |
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.
scalar(JsonKeys.class, "json_keys"), | |
scalar(JsonKeys.class, "jsonb_keys"), | |
scalar(JsonKeys.class, "json_keys", "jsonb_keys"), |
run buildall |
TPC-H: Total hot run time: 40655 ms
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 170389 ms
|
ClickBench: Total hot run time: 30.83 s
|
...core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/JsonKeys.java
Show resolved
Hide resolved
ClickBench: Total hot run time: 31.75 s
|
PR approved by at least one committer and no changes requested. |
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
run buildall |
TPC-H: Total hot run time: 40107 ms
|
TPC-DS: Total hot run time: 172664 ms
|
ClickBench: Total hot run time: 31.06 s
|
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
PR approved by at least one committer and no changes requested. |
support json_keys sql reference MYSQL: https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-keys
## Proposed changes backport: #36411 Issue Number: close #xxx <!--Describe your changes.-->
Proposed changes
support json_keys
sql reference MYSQL: https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html#function_json-keys
Issue Number: close #xxx