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

Add exists subquery support. #144

Merged
merged 15 commits into from
Sep 15, 2015
Merged

Add exists subquery support. #144

merged 15 commits into from
Sep 15, 2015

Conversation

qiuyesuifeng
Copy link
Member

No description provided.

res := []interface{}{}
err = p.Do(ctx, func(id interface{}, data []interface{}) (bool, error) {
if count > 0 {
return true, nil
Copy link
Member

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

@qiuyesuifeng
Copy link
Member Author

PTAL

@coocood
Copy link
Member

coocood commented Sep 15, 2015

LGTM

}

// Eval implements the Expression Eval interface.
func (es *ExistsSubQuery) Eval(ctx context.Context, args map[interface{}]interface{}) (interface{}, error) {
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, my fault.

@qiuyesuifeng
Copy link
Member Author

@siddontang PTAL

@siddontang
Copy link
Member

LGTM

ngaut added a commit that referenced this pull request Sep 15, 2015
@ngaut ngaut merged commit fa7a501 into master Sep 15, 2015
@ngaut ngaut deleted the qiuyesuifeng/exists-subquery branch September 15, 2015 10:17
YuJuncen pushed a commit to YuJuncen/tidb that referenced this pull request Apr 23, 2021
* cmd: convert version command to flags

Signed-off-by: Neil Shen <[email protected]>

* address comments

Signed-off-by: Neil Shen <[email protected]>
xhebox pushed a commit to xhebox/tidb that referenced this pull request Sep 28, 2021
xhebox pushed a commit to xhebox/tidb that referenced this pull request Oct 8, 2021
ti-chi-bot pushed a commit that referenced this pull request Oct 9, 2021
okJiang pushed a commit to okJiang/tidb that referenced this pull request Oct 19, 2021
nolouch pushed a commit to tidblabs/tidb that referenced this pull request Jan 6, 2023
…ase 6.4` rate limit (pingcap#155)

* merge pr#130,pingcap#133 into 6.4

Signed-off-by: zeminzhou <[email protected]>

* fix start limit rate

Signed-off-by: zeminzhou <[email protected]>

* default config

Signed-off-by: zeminzhou <[email protected]>

* 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 <[email protected]>

* update golang.org/x/text to 0.3.8

Signed-off-by: zeminzhou <[email protected]>

* Fix error handle when loadKeyspace failed at startup (pingcap#143)

Signed-off-by: yongman <[email protected]>

Signed-off-by: yongman <[email protected]>

* add keyspace-activate mode (pingcap#142)

* fix loadkeyspace nil (pingcap#144)

* fix loadkeyspace nil

Signed-off-by: ystaticy <[email protected]>

* retry load keyspace

Signed-off-by: David <[email protected]>

* address comments

Signed-off-by: David <[email protected]>

Signed-off-by: ystaticy <[email protected]>
Signed-off-by: David <[email protected]>
Co-authored-by: David <[email protected]>

* Compatible with old pd

Signed-off-by: zeminzhou <[email protected]>

Signed-off-by: zeminzhou <[email protected]>
Signed-off-by: yongman <[email protected]>
Signed-off-by: ystaticy <[email protected]>
Signed-off-by: David <[email protected]>
Co-authored-by: yongman <[email protected]>
Co-authored-by: better0332 <[email protected]>
Co-authored-by: ystaticy <[email protected]>
Co-authored-by: David <[email protected]>

* make check

Signed-off-by: zeminzhou <[email protected]>

* fix confict

Signed-off-by: zeminzhou <[email protected]>

* make check

Signed-off-by: zeminzhou <[email protected]>

Signed-off-by: zeminzhou <[email protected]>
Signed-off-by: yongman <[email protected]>
Signed-off-by: ystaticy <[email protected]>
Signed-off-by: David <[email protected]>
Co-authored-by: yongman <[email protected]>
Co-authored-by: better0332 <[email protected]>
Co-authored-by: ystaticy <[email protected]>
Co-authored-by: David <[email protected]>
nolouch pushed a commit to tidblabs/tidb that referenced this pull request Jan 6, 2023
…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 <[email protected]>

* make check

Signed-off-by: zeminzhou <[email protected]>

* make check

Signed-off-by: zeminzhou <[email protected]>

* fix error

Signed-off-by: zeminzhou <[email protected]>

* fix comment

Signed-off-by: zeminzhou <[email protected]>

* make check

Signed-off-by: zeminzhou <[email protected]>

Signed-off-by: zeminzhou <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants