-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Add exists subquery support. #144
Conversation
res := []interface{}{} | ||
err = p.Do(ctx, func(id interface{}, data []interface{}) (bool, error) { | ||
if count > 0 { | ||
return true, nil |
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.
return false, nil to terminate Do
PTAL |
LGTM |
} | ||
|
||
// Eval implements the Expression Eval interface. | ||
func (es *ExistsSubQuery) Eval(ctx context.Context, args map[interface{}]interface{}) (interface{}, error) { |
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.
if next returns value, we can hold this value for later Eval, so that we don't need to run sub query again.
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.
Got it, my fault.
@siddontang PTAL |
LGTM |
* cmd: convert version command to flags Signed-off-by: Neil Shen <overvenus@gmail.com> * address comments Signed-off-by: Neil Shen <overvenus@gmail.com>
…tmt, AnalyzeTableStmt and LoadStatsStmt (pingcap#144)
…tmt, AnalyzeTableStmt and LoadStatsStmt (pingcap#144)
…tmt, AnalyzeTableStmt and LoadStatsStmt (#144)
…ase 6.4` rate limit (pingcap#155) * merge pr#130,pingcap#133 into 6.4 Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * fix start limit rate Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * default config Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * keyspace: use `user_storage_size` instead of `storage_size` for ratelimit (pingcap#145) * use user_storage_size instead of storage_size for ratelimit Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * update golang.org/x/text to 0.3.8 Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * Fix error handle when loadKeyspace failed at startup (pingcap#143) Signed-off-by: yongman <yming0221@gmail.com> Signed-off-by: yongman <yming0221@gmail.com> * add keyspace-activate mode (pingcap#142) * fix loadkeyspace nil (pingcap#144) * fix loadkeyspace nil Signed-off-by: ystaticy <y_static_y@sina.com> * retry load keyspace Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> * address comments Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Signed-off-by: ystaticy <y_static_y@sina.com> Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> * Compatible with old pd Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: yongman <yming0221@gmail.com> Signed-off-by: ystaticy <y_static_y@sina.com> Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Co-authored-by: yongman <yming0221@gmail.com> Co-authored-by: better0332 <better0332@163.com> Co-authored-by: ystaticy <y_static_y@sina.com> Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> * make check Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * fix confict Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * make check Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: yongman <yming0221@gmail.com> Signed-off-by: ystaticy <y_static_y@sina.com> Signed-off-by: David <8039876+AmoebaProtozoa@users.noreply.github.com> Co-authored-by: yongman <yming0221@gmail.com> Co-authored-by: better0332 <better0332@163.com> Co-authored-by: ystaticy <y_static_y@sina.com> Co-authored-by: David <8039876+AmoebaProtozoa@users.noreply.github.com>
…ap#144 into keyspace on release 6.4 (pingcap#161) * Merge PR pingcap#78,pingcap#79,pingcap#82,pingcap#83,pingcap#86,pingcap#144 into keyspace on release 6.4 Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * make check Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * make check Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * fix error Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * fix comment Signed-off-by: zeminzhou <zhouzemin@pingcap.com> * make check Signed-off-by: zeminzhou <zhouzemin@pingcap.com> Signed-off-by: zeminzhou <zhouzemin@pingcap.com>
No description provided.