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

parser: support SQL bind capture filter syntax #1274

Closed
wants to merge 1 commit into from

Conversation

eurekaka
Copy link
Contributor

What problem does this PR solve?

Parser changes for pingcap/tidb#15655

What is changed and how it works?

Add new syntax for baseline capture filter.

Check List

Tests

  • Unit test

Code changes

  • Has exported function/method change
  • Has exported variable/fields change

Side effects

N/A

Related changes

  • Need to update the documentation

@eurekaka eurekaka requested a review from Reminiscent July 14, 2021 07:54
@tangenta
Copy link
Contributor

NOT IGNORE sounds counter-intuitive... Can we use ADD/REMOVE instead?

admin capture bindings remove table t1;
admin capture bindings remove table test.t1;
admin capture bindings add table t1;
admin capture bindings add table test.t1;
admin capture bindings remove database db1;
admin capture bindings add database db1;
admin capture bindings show;

@eurekaka
Copy link
Contributor Author

eurekaka commented Jul 14, 2021

NOT IGNORE sounds counter-intuitive... Can we use ADD/REMOVE instead?

admin capture bindings remove table t1;
admin capture bindings remove table test.t1;
admin capture bindings add table t1;
admin capture bindings add table test.t1;
admin capture bindings remove database db1;
admin capture bindings add database db1;
admin capture bindings show;

The capture filter is acting as a blacklist, so we need a negative keyword. The not ignore is to remove the item from the blacklist. If we use add / remove, users may think that only the added items are considered for baseline capture.

@tangenta
Copy link
Contributor

tangenta commented Jul 14, 2021

Ok. Another question: is it possible to use a system table to represent the blacklist(like mysql.expr_pushdown_blacklist)? One of the advantages is that we can use INSERT/DELETE/SELECT to show the list, which is easier to learn.

@eurekaka
Copy link
Contributor Author

Ok. Another question: is it possible to use a system table to represent the blacklist(like mysql.expr_pushdown_blacklist)? One of the advantages is that we can use INSERT/DELETE/SELECT to show the list, which is easier to learn.

Alright.

@eurekaka eurekaka closed this Jul 14, 2021
@eurekaka eurekaka deleted the capture_filter branch July 14, 2021 08:48
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.

2 participants