Uh oh!
There was an error while loading. Please reload this page.
[opt](fucntion) improve json_extract function handle const column - #36927
Conversation
doris-robot
commented
Jun 27, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
zhangstar333
commented
Jun 27, 2024
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Jun 27, 2024
TPC-H: Total hot run time: 40506 ms |
doris-robot
commented
Jun 27, 2024
TPC-DS: Total hot run time: 174690 ms |
doris-robot
commented
Jun 27, 2024
ClickBench: Total hot run time: 31.28 s |
zhangstar333
commented
Jun 27, 2024
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Jun 27, 2024
TPC-H: Total hot run time: 39882 ms |
doris-robot
commented
Jun 27, 2024
TPC-DS: Total hot run time: 173377 ms |
doris-robot
commented
Jun 27, 2024
ClickBench: Total hot run time: 30.65 s |
zhangstar333
commented
Jun 28, 2024
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Jun 28, 2024
TPC-H: Total hot run time: 40229 ms |
doris-robot
commented
Jun 28, 2024
TPC-DS: Total hot run time: 172842 ms |
doris-robot
commented
Jun 28, 2024
ClickBench: Total hot run time: 30.47 s |
zhangstar333
commented
Jun 28, 2024
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Jun 28, 2024
TPC-H: Total hot run time: 39772 ms |
doris-robot
commented
Jun 28, 2024
TPC-DS: Total hot run time: 174389 ms |
doris-robot
commented
Jun 28, 2024
ClickBench: Total hot run time: 30.79 s |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
clang-tidy review says "All clean, LGTM! 👍" |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
zhangstar333
commented
Jul 1, 2024
run buildall |
doris-robot
commented
Jul 1, 2024
TPC-H: Total hot run time: 39622 ms |
doris-robot
commented
Jul 1, 2024
TPC-DS: Total hot run time: 173312 ms |
doris-robot
commented
Jul 1, 2024
ClickBench: Total hot run time: 31.06 s |
…6927) ## Proposed changes VARCHAR json_extract(VARCHAR json_str, VARCHAR path[, VARCHAR path] ...) ``` for (int i = 0; i < arguments.size(); i++) { column_ptrs.push_back( block.get_by_position(arguments[i]).column->convert_to_full_column_if_const()); data_columns.push_back(assert_cast<const ColumnString*>(column_ptrs.back().get())); } before not handle const column, as the input arguments are variadic, and most user case is like: json_extract(column, '$.fparam.nested_2') so could special deal with two arguments could reuse json document. ``` ``` mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (1.06 sec) mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (1.02 sec) mysql [test]> mysql [test]> mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (44.22 sec) mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (42.80 sec) ``` <!--Describe your changes.-->
…ache#36927) ## Proposed changes VARCHAR json_extract(VARCHAR json_str, VARCHAR path[, VARCHAR path] ...) ``` for (int i = 0; i < arguments.size(); i++) { column_ptrs.push_back( block.get_by_position(arguments[i]).column->convert_to_full_column_if_const()); data_columns.push_back(assert_cast<const ColumnString*>(column_ptrs.back().get())); } before not handle const column, as the input arguments are variadic, and most user case is like: json_extract(column, '$.fparam.nested_2') so could special deal with two arguments could reuse json document. ``` ``` mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (1.06 sec) mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (1.02 sec) mysql [test]> mysql [test]> mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (44.22 sec) mysql [test]>select count(json_extract(a, '$.fparam.nested_2')) from json_table_2; +---------------------------------------------+ | count(json_extract(a, '$.fparam.nested_2')) | +---------------------------------------------+ | 10000001 | +---------------------------------------------+ 1 row in set (42.80 sec) ``` <!--Describe your changes.-->
Proposed changes
VARCHAR json_extract(VARCHAR json_str, VARCHAR path[, VARCHAR path] ...)