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

Replace with PingCAP parser and add JOIN support #15

Closed
wants to merge 24 commits into from
Closed

Replace with PingCAP parser and add JOIN support #15

wants to merge 24 commits into from

Conversation

jiekun
Copy link

@jiekun jiekun commented Mar 26, 2022

  • [] Do only one thing
  • Non breaking API changes
  • [] Tested

What did this pull request do?

Hi. This PR aim to propose replacing current parser with new parser.

Currently, the parser misses the implementation of JOIN (and maybe other features).

I modified the codes for a draft look, which is ok to run. But the idea itself needs more discussion before we could start the development.

User Case Description

-- ftQuery
SELECT `table_a`.`id`,`table_a`.`payment_id`,`table_a`.`payment_method`,`table_a`.`request_no` FROM `table_a` INNER JOIN `table_b` ON `table_a`.`payment_id` = `table_b`.`payment_id` WHERE `table_a`.`payment_id` = ? AND `table_b`.`payment_id` = ? LIMIT 1

-- stQuery
SELECT `table_a_00000005`.`id`,`table_a_00000005`.`payment_id`,`table_a_00000005`.`payment_method`,`table_a_00000005`.`request_no` FROM `table_a_00000005` JOIN `table_b_00000005` ON `table_a_00000005`.`payment_id`=`table_b_00000005`.`payment_id` WHERE `table_a_00000005`.`payment_id`=? AND `table_b_00000005`.`payment_id`=? LIMIT 1

@huacnlee
Copy link
Collaborator

Before we done this, we had checked that.

PingCAP SQL parser can't supports PostgreSQL, we at least need PostgreSQL and MySQL.

@jiekun
Copy link
Author

jiekun commented Mar 28, 2022

@huacnlee Thanks for replying. So the main concern here is to use a parser that could support both Postgre and MySQL right? I don't know if there is any alternative parser that meets the requirement. AFAIK, The parser this package used could handle few scene only.

@jiekun
Copy link
Author

jiekun commented Mar 29, 2022

I am going to close this PR for now based on @huacnlee 's explanation.

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.

None yet

2 participants