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

Support VALUES and TABLE statements syntax #19934

Closed
tangenta opened this issue Sep 10, 2020 · 10 comments · Fixed by #20314
Closed

Support VALUES and TABLE statements syntax #19934

tangenta opened this issue Sep 10, 2020 · 10 comments · Fixed by #20314
Labels
challenge-program help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. sig/sql-infra SIG: SQL Infra type/compatibility

Comments

@tangenta
Copy link
Contributor

Description

Related parser issue: pingcap/parser#869

Example

The TABLE and VALUES statements are two query specification statements introduced in MySQL 8.0.19.

TABLE tbl_name [ORDER BY col_name] [LIMIT limit [OFFSET offset]];

VALUES ROW(val1, val2, …), … [ORDER BY column_N [LIMIT limit [OFFSET offset]]];

Explaination

These can be used in place everywhere a SELECT statement was expected, including:

  • UNION
  • JOIN
  • subqueries
  • SELECT INTO OUTFILE
  • INSERT INTO SELECT
  • CREATE TABLE SELECT

Solution

For a reference, please see pingcap/parser#680 and learn how to support a new syntax in the parser.

Score

  • 300

SIG Slack Channel

You can join #sig-ddl on slack in your spare time to discuss and get help with mentors or others.

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Parser
  • Golang

Learning Materials

@tangenta tangenta added help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. type/compatibility difficulty/easy sig/sql-infra SIG: SQL Infra challenge-program labels Sep 10, 2020
@ghost ghost mentioned this issue Sep 10, 2020
70 tasks
@YangKian
Copy link
Contributor

/pick-up

@ti-challenge-bot
Copy link

Pick up success.

@ti-challenge-bot
Copy link

@YangKian You did not submit PR within 7 days, so give up automatically.

@ti-challenge-bot ti-challenge-bot bot removed the picked label Sep 18, 2020
@YangKian
Copy link
Contributor

/pick-up

@ti-challenge-bot
Copy link

Pick up success.

@ti-challenge-bot
Copy link

@YangKian You did not submit PR within 7 days, so give up automatically.

@ti-challenge-bot ti-challenge-bot bot removed the picked label Sep 25, 2020
@YangKian
Copy link
Contributor

/pick-up

@ti-challenge-bot
Copy link

Pick up success.

@ti-challenge-bot
Copy link

@YangKian You did not submit PR within 7 days, so give up automatically.

@ti-challenge-bot ti-challenge-bot bot removed the picked label Oct 2, 2020
@kennytm
Copy link
Contributor

kennytm commented Dec 3, 2020

We should reopen this. #20314 only updated the parser deps, but did not actually implement the feature. Currently using TABLE and VALUES statement just crashes (#21486). At least it should throw a friendly "not yet implemented" error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
challenge-program help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. sig/sql-infra SIG: SQL Infra type/compatibility
Projects
None yet
3 participants