Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/expression/infer_pushdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ func scalarExprSupportedByTiKV(ctx EvalContext, sf *ScalarFunction) bool {
ast.Sysdate, /* ast.StrToDate, */

// encryption functions.
ast.MD5, ast.SHA1, ast.UncompressedLength,
ast.MD5, ast.SHA1, ast.SHA2, ast.UncompressedLength,
Comment thread
joechenrh marked this conversation as resolved.
Comment thread
joechenrh marked this conversation as resolved.

ast.Cast,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ id task access object operator info
Projection root md5(planner__core__casetest__pushdown__push_down.t.s)->Column
└─TableReader root data:TableFullScan
└─TableFullScan cop[tikv] table:t keep order:false, stats:pseudo
explain format = 'plan_tree' select * from t where sha2(s, 256) = 'abc';
id task access object operator info
TableReader root data:Selection
└─Selection cop[tikv] eq(sha2(planner__core__casetest__pushdown__push_down.t.s, 256), "abc")
└─TableFullScan cop[tikv] table:t keep order:false, stats:pseudo
explain format = 'plan_tree' select c from t where a+1=3;
id task access object operator info
Projection root planner__core__casetest__pushdown__push_down.t.c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ explain format = 'plan_tree' select json_unquote(a) from t2;
explain format = 'plan_tree' select i * 2 from t;
explain format = 'plan_tree' select DATE_FORMAT(t, '%Y-%m-%d %H') as date from t;
explain format = 'plan_tree' select md5(s) from t;
explain format = 'plan_tree' select * from t where sha2(s, 256) = 'abc';
Comment thread
joechenrh marked this conversation as resolved.
explain format = 'plan_tree' select c from t where a+1=3;
explain format = 'plan_tree' select /*+ hash_agg()*/ count(b) from (select id + 1 as b from t)A;
explain format = 'plan_tree' select /*+ hash_agg()*/ count(*) from (select id + 1 as b from t)A;
Expand Down
Loading