Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
sql/parse: add test for unary minus
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
  • Loading branch information
erizocosmico committed Oct 19, 2018
1 parent aaeecd0 commit 03bb18b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sql/parse/parse_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,14 @@ var fixtures = map[string]sql.Node{
`SHOW CREATE SCHEMA foo`: plan.NewShowCreateDatabase(sql.UnresolvedDatabase("foo"), false),
`SHOW CREATE DATABASE IF NOT EXISTS foo`: plan.NewShowCreateDatabase(sql.UnresolvedDatabase("foo"), true),
`SHOW CREATE SCHEMA IF NOT EXISTS foo`: plan.NewShowCreateDatabase(sql.UnresolvedDatabase("foo"), true),
`SELECT -i FROM mytable`: plan.NewProject(
[]sql.Expression{
expression.NewUnaryMinus(
expression.NewUnresolvedColumn("i"),
),
},
plan.NewUnresolvedTable("mytable", ""),
),
}

func TestParse(t *testing.T) {
Expand Down

0 comments on commit 03bb18b

Please sign in to comment.