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

remove json_unquote() from expressions-pushed-down.md (#5564) #5566

Merged
merged 1 commit into from
May 6, 2021

Conversation

ti-srebot
Copy link
Contributor

@ti-srebot ti-srebot commented May 6, 2021

cherry-pick #5564 to master
You can switch your code base to this Pull Request by using git-extras:

# In docs repo:
git pr https://github.com/pingcap/docs/pull/5566

After apply modifications, you can push your change to this PR via:

git push git@github.com:ti-srebot/docs.git pr/5566:master-66542ffc76a2

I removed JSON_UNQUOTE() because this expression is not currently pushed down.

pingcap/tidb@721782d

MySQL [test]> explain analyze select count(*) from t2 where json_unquote(json_extract(j, '$[0]')) < 10;
+-----------------------------+---------+---------+-----------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+------+
| id                          | estRows | actRows | task      | access object | execution info                                                                                                                                                                                              | operator info                                                           | memory    | disk |
+-----------------------------+---------+---------+-----------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+------+
| StreamAgg_7                 | 1.00    | 1       | root      |               | time:1.36ms, loops:2                                                                                                                                                                                        | funcs:count(1)->Column#3                                                | 636 Bytes | N/A  |
| └─Selection_11              | 1.60    | 2       | root      |               | time:1.35ms, loops:2                                                                                                                                                                                        | lt(cast(json_unquote(cast(json_extract(cast(test.t2.j), "$[0]")))), 10) | 628 Bytes | N/A  |
|   └─TableReader_13          | 2.00    | 2       | root      |               | time:1.3ms, loops:3, cop_task: {num: 1, max: 1.24ms, proc_keys: 2, rpc_num: 1, rpc_time: 1.22ms, copr_cache_hit_ratio: 0.00}                                                                                | data:TableRangeScan_12                                                  | 219 Bytes | N/A  |
|     └─TableRangeScan_12     | 2.00    | 2       | cop[tikv] | table:t2      | tikv_task:{time:0s, loops:1}, scan_detail: {total_process_keys: 2, total_keys: 4, rocksdb: {delete_skipped_count: 0, key_skipped_count: 2, block: {cache_hit_count: 0, read_count: 0, read_byte: 0 Bytes}}} | range:[0,+inf], keep order:false, stats:pseudo                          | N/A       | N/A  |
+-----------------------------+---------+---------+-----------+---------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+------+
4 rows in set, 1 warning (0.002 sec)

MySQL [test]> show warnings;
+---------+------+----------------------------------------------------------------------------------------------+
| Level   | Code | Message                                                                                      |
+---------+------+----------------------------------------------------------------------------------------------+
| Warning | 1105 | Scalar function 'json_unquote'(signature: JsonUnquoteSig) can not be pushed to storage layer |
+---------+------+----------------------------------------------------------------------------------------------+
1 row in set (0.000 sec)

First-time contributors' checklist

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v5.0 (TiDB 5.0 versions)
  • v4.0 (TiDB 4.0 versions)
  • v3.1 (TiDB 3.1 versions)
  • v3.0 (TiDB 3.0 versions)
  • v2.1 (TiDB 2.1 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot ti-srebot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. type/master-cherry-pick labels May 6, 2021
@ti-srebot
Copy link
Contributor Author

@kolbe please accept the invitation then you can push to the cherry-pick pull requests.
https://github.com/ti-srebot/docs/invitations

@morgo
Copy link
Contributor

morgo commented May 6, 2021

/LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 6, 2021
@TomShawn
Copy link
Contributor

TomShawn commented May 6, 2021

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • TomShawn
  • morgo

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels May 6, 2021
@TomShawn
Copy link
Contributor

TomShawn commented May 6, 2021

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 399c5ec

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 6, 2021
@ti-chi-bot ti-chi-bot merged commit 8846a15 into pingcap:master May 6, 2021
@TomShawn TomShawn deleted the master-66542ffc76a2 branch May 6, 2021 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants