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

docs: rewrite quickstart.md #884

Merged
merged 12 commits into from
Jun 29, 2020
Merged

Conversation

tangenta
Copy link
Contributor

@tangenta tangenta commented Jun 3, 2020

What problem does this PR solve?

As mentioned in #812, #788, and a few other issues, it is not easy to quickstart with parser. This PR rewrites quickstart.md by giving an example of parsing SQL text and traversing AST nodes.

What is changed and how it works?

Check List

Tests

Code changes

Side effects

Related changes

@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #884 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #884      +/-   ##
==========================================
- Coverage   78.37%   78.33%   -0.04%     
==========================================
  Files          40       40              
  Lines       14783    14765      -18     
==========================================
- Hits        11586    11566      -20     
- Misses       2509     2511       +2     
  Partials      688      688              

Copy link
Contributor

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

Rest LGTM

docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
> Here are a few things you might want to know:
> - To use a parser, a `parser_driver` is required. It decides how to parse the basic data types in SQL.
>
> You can use `github.com/pingcap/parser/test_driver` as the `parser_driver` for test. Again, if you need advanced features, please use the `test_driver` in TiDB(`go get -v github.com/pingcap/tidb/types/parser_driver@v4.0.0-rc.1` and import it).
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> You can use `github.com/pingcap/parser/test_driver` as the `parser_driver` for test. Again, if you need advanced features, please use the `test_driver` in TiDB(`go get -v github.com/pingcap/tidb/types/parser_driver@v4.0.0-rc.1` and import it).
> You can use `github.com/pingcap/parser/test_driver` as the `parser_driver` for test. Again, if you need advanced features, please use the `test_driver` in TiDB (`go get -v github.com/pingcap/tidb/types/parser_driver@v4.0.0-rc.1` and import it).

BTW why 4.0.0-rc.1 ?

Copy link
Contributor Author

@tangenta tangenta Jun 4, 2020

Choose a reason for hiding this comment

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

I found the latest released parser version is 4.0.0-rc.1.

docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

Rest LGTM

docs/quickstart.md Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
@tangenta tangenta force-pushed the rewrite-quickstart branch from 3822be1 to f9486ef Compare June 17, 2020 07:30
@tangenta tangenta requested a review from AilinKid June 17, 2020 07:41
Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

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

LGTM

@AilinKid AilinKid added the status/LGT1 LGT1 label Jun 18, 2020
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
tangenta and others added 3 commits June 28, 2020 13:31
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
Co-authored-by: Ran <huangran@pingcap.com>
docs/quickstart.md Outdated Show resolved Hide resolved
tangenta and others added 2 commits June 28, 2020 13:33
docs/quickstart.md Outdated Show resolved Hide resolved
Co-authored-by: Ran <huangran@pingcap.com>
@tangenta tangenta requested a review from ran-huang June 28, 2020 07:17
Copy link

@ran-huang ran-huang left a comment

Choose a reason for hiding this comment

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

Rest LGTM

docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
docs/quickstart.md Outdated Show resolved Hide resolved
@tangenta tangenta requested a review from ran-huang June 28, 2020 10:33
@tangenta tangenta merged commit d24ab57 into pingcap:master Jun 29, 2020
tiancaiamao pushed a commit to tiancaiamao/parser that referenced this pull request Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants