XiaoMi / soar

SQL Optimizer And Rewriter
Apache License 2.0
8.67k stars 1.32k forks source link

merge alter token split bug #97

Closed martianzhang closed 5 years ago

martianzhang commented 5 years ago

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.

file: 1.sql

alter table `tb`add index `idx_a`(a);
alter table `tb`add column b int;
./bin/soar -report-type rewrite -rewrite-rules mergealter -query 1.sql
  1. What did you expect to see?
ALTER TABLE `tb` add index `idx_a`(a), add column b int ;
  1. What did you see instead?
ALTER TABLE `tb` index `idx_a`(a), column b int ;
  1. What version of are you using (soar -version)?

0.9.0