parser icon indicating copy to clipboard operation
parser copied to clipboard

Window Function syntax error

Open holyhe opened this issue 3 years ago • 0 comments

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?

// use d1; // CREATE TABLE t1 (qty INT, price INT);

ddl = "CREATE VIEW t8 AS SELECT qty, price, ROW_NUMBER() OVER(PARTITION BY qty ORDER BY price) AS row_num FROM t1;" nodes, _, err := parser.New().Parse(ddl, "", "")

  1. What did you expect to see?

parser.New().Parse(ddl, "", "") return success

  1. What did you see instead? parser.New().Parse(ddl, "", "") return error error msg: line 1 column 150 near "(PARTITION BY t1.qty ORDER BY t1.price ) AS row_num from t1"

  2. What version of TiDB SQL Parser are you using? github.com/pingcap/parser v0.0.0-20200623164729-3a18f1e5dceb

holyhe avatar Jul 13 '22 07:07 holyhe