Skip to content

Commit

Permalink
Add test for extend bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ejcx committed Mar 5, 2024
1 parent 9a0cbf1 commit 7075437
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,42 @@ var parserTests = []struct {
},
},
},
{
name: "ExtendError",
query: "StormEvents | extend FooFooF=1 State",
err: true,
want: &TabularExpr{
Source: &TableRef{
Table: &Ident{
Name: "StormEvents",
NameSpan: newSpan(0, 11),
},
},
Operators: []TabularOperator{
&ExtendOperator{
Pipe: newSpan(12, 13),
Keyword: newSpan(14, 20),
Cols: []*ExtendColumn{
{
Name: &Ident{
Name: "FooFooF",
NameSpan: newSpan(21, 28),
},
Assign: Span{
Start: 28,
End: 29,
},
X: &BasicLit{
Kind: TokenNumber,
Value: "1",
ValueSpan: newSpan(29, 30),
},
},
},
},
},
},
},
{
name: "UniqueCombination",
query: "StormEvents | summarize by State, EventType",
Expand Down

0 comments on commit 7075437

Please sign in to comment.