XiaoMi / soar

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

Cant handle Create TEMPORAEY #203

Closed lolspider closed 5 years ago

lolspider 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.

soar -query 1.sql -only-syntax-check At SQL 1 : line 1 column 16 near "CREATE TEMPORARY TABLE IF NOT EXISTS table2 AS (SELECT * FROM table1)" (total length 69)

  1. What did you expect to see? i want to handle create temporary correctly.

  2. What did you see instead?

i get an error.

  1. What version of are you using (soar -version)?

soar -version Version: 2019-01-21 16:54:09 +0800 0.11.0-16-gc12ae96 Branch: master Compile: 2019-02-18 16:14:56 +0800 by go version go1.11.5 darwin/amd64 GitDirty: 0

martianzhang commented 5 years ago

soar use pingcap/parser as it's SQL parser, create temporary is not supported yet.

image

martianzhang commented 5 years ago

Related Issue: https://github.com/pingcap/parser/issues/52

martianzhang commented 5 years ago

pingcap/parser has supported create temporary table syntax