Skip to content

Window Function syntax error #1423

@holyhe

Description

@holyhe

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions