-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #30
- Loading branch information
Showing
34 changed files
with
413 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
LexResults | ||
| join (Tokens) on Kind | ||
| sort by SpanStart asc | ||
| project TokenConstant, Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TokenIdentifier,foo | ||
TokenPipe, | ||
TokenIdentifier,bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
WITH "subquery0" AS (SELECT * FROM "Tokens"), | ||
"subquery1" AS (SELECT * FROM (SELECT DISTINCT * FROM "LexResults") AS "$left" JOIN "subquery0" AS "$right" ON "$left"."Kind" = "$right"."Kind" ORDER BY "SpanStart" ASC NULLS FIRST) | ||
SELECT "TokenConstant" AS "TokenConstant", "Value" AS "Value" FROM "subquery1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
LexResults | ||
| join (Tokens) on $left.Kind == $right.Kind | ||
| sort by SpanStart asc | ||
| project TokenConstant, Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TokenIdentifier,foo | ||
TokenPipe, | ||
TokenIdentifier,bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
WITH "subquery0" AS (SELECT * FROM "Tokens"), | ||
"subquery1" AS (SELECT * FROM (SELECT DISTINCT * FROM "LexResults") AS "$left" JOIN "subquery0" AS "$right" ON "$left"."Kind" = "$right"."Kind" ORDER BY "SpanStart" ASC NULLS FIRST) | ||
SELECT "TokenConstant" AS "TokenConstant", "Value" AS "Value" FROM "subquery1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
LexResults | ||
| join (Tokens) on Kind, Value != "bar" | ||
| sort by SpanStart asc | ||
| project TokenConstant, Value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
TokenIdentifier,foo | ||
TokenPipe, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
WITH "subquery0" AS (SELECT * FROM "Tokens"), | ||
"subquery1" AS (SELECT * FROM (SELECT DISTINCT * FROM "LexResults") AS "$left" JOIN "subquery0" AS "$right" ON ("$left"."Kind" = "$right"."Kind") AND (coalesce("Value" <> 'bar', FALSE)) ORDER BY "SpanStart" ASC NULLS FIRST) | ||
SELECT "TokenConstant" AS "TokenConstant", "Value" AS "Value" FROM "subquery1"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
StormEvents | ||
| project State | ||
| join kind=inner (StateCapitals | project State = upper(State), StateCapital) on State | ||
| sort by State asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FLORIDA,FLORIDA,Tallahassee | ||
FLORIDA,FLORIDA,Tallahassee | ||
GEORGIA,GEORGIA,Atlanta | ||
MISSISSIPPI,MISSISSIPPI,Jackson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
WITH "subquery0" AS (SELECT "State" AS "State" FROM "StormEvents"), | ||
"subquery1" AS (SELECT upper("State") AS "State", "StateCapital" AS "StateCapital" FROM "StateCapitals") | ||
SELECT * FROM "subquery0" AS "$left" JOIN "subquery1" AS "$right" ON "$left"."State" = "$right"."State" ORDER BY "State" ASC NULLS FIRST; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
StormEvents | ||
| project State | ||
| join kind=innerunique (StateCapitals | project State = upper(State), StateCapital) on State | ||
| sort by State asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FLORIDA,FLORIDA,Tallahassee | ||
GEORGIA,GEORGIA,Atlanta | ||
MISSISSIPPI,MISSISSIPPI,Jackson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
WITH "subquery0" AS (SELECT "State" AS "State" FROM "StormEvents"), | ||
"subquery1" AS (SELECT upper("State") AS "State", "StateCapital" AS "StateCapital" FROM "StateCapitals") | ||
SELECT * FROM (SELECT DISTINCT * FROM "subquery0") AS "$left" JOIN "subquery1" AS "$right" ON "$left"."State" = "$right"."State" ORDER BY "State" ASC NULLS FIRST; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
Tokens | ||
| where Value - 3 > 0 | ||
| sort by Value asc | ||
| where Kind - 3 > 0 | ||
| sort by Kind asc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
4,TokenString | ||
5,TokenAnd | ||
6,TokenOr | ||
7,TokenPipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM "Tokens" WHERE ("Value" - 3) > 0 ORDER BY "Value" ASC NULLS FIRST; | ||
SELECT * FROM "Tokens" WHERE ("Kind" - 3) > 0 ORDER BY "Kind" ASC NULLS FIRST; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Tokens | ||
| where abs(Value) == 1 | ||
| where abs(Kind) == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM "Tokens" WHERE coalesce(abs("Value") = 1, FALSE); | ||
SELECT * FROM "Tokens" WHERE coalesce(abs("Kind") = 1, FALSE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Tokens | ||
| where isnotnull(Value) | ||
| where isnotnull(Kind) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
4,TokenString | ||
5,TokenAnd | ||
6,TokenOr | ||
7,TokenPipe | ||
-1,TokenError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM "Tokens" WHERE "Value" IS NOT NULL; | ||
SELECT * FROM "Tokens" WHERE "Kind" IS NOT NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Tokens | ||
| where isnull(Value) | ||
| where isnull(Kind) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM "Tokens" WHERE "Value" IS NULL; | ||
SELECT * FROM "Tokens" WHERE "Kind" IS NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Tokens | ||
| where not(Value > 0) | ||
| where not(Kind > 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM "Tokens" WHERE NOT ("Value" > 0); | ||
SELECT * FROM "Tokens" WHERE NOT ("Kind" > 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Tokens | ||
| where Value != -1 | ||
| where Kind != -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
4,TokenString | ||
5,TokenAnd | ||
6,TokenOr | ||
7,TokenPipe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT * FROM "Tokens" WHERE coalesce("Value" <> -1, FALSE); | ||
SELECT * FROM "Tokens" WHERE coalesce("Kind" <> -1, FALSE); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Kind,SpanStart,SpanEnd,Value | ||
1,0,3,foo | ||
7,4,5,"" | ||
1,6,9,bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
"State","StateCapital" | ||
Alabama,Montgomery | ||
Alaska,Juneau | ||
Arizona,Phoenix | ||
Arkansas,Little | ||
California,Sacramento | ||
Colorado,Denver | ||
Connecticut,Hartford | ||
Delaware,Dover | ||
Florida,Tallahassee | ||
Georgia,Atlanta | ||
Hawaii,Honolulu | ||
Idaho,Boise | ||
Illinois,Springfield | ||
Indiana,Indianapolis | ||
Iowa,Des | ||
Kansas,Topeka | ||
Kentucky,Frankfort | ||
Louisiana,Baton | ||
Maine,Augusta | ||
Maryland,Annapolis | ||
Massachusetts,Boston | ||
Michigan,Lansing | ||
Minnesota,Saint | ||
Mississippi,Jackson | ||
Missouri,Jefferson | ||
Montana,Helena | ||
Nebraska,Lincoln | ||
Nevada,Carson | ||
New Hampshire,Concord | ||
New Jersey,Trenton | ||
New Mexico,Santa | ||
New York,Albany | ||
North Carolina,Raleigh | ||
North Dakota,Bismarck | ||
Ohio,Columbus | ||
Oklahoma,Oklahoma | ||
Oregon,Salem | ||
Pennsylvania,Harrisburg | ||
Rhode Island,Providence | ||
South Carolina,Columbia | ||
South Dakota,Pierre | ||
Tennessee,Nashville | ||
Texas,Austin | ||
Utah,Salt | ||
Vermont,Montpelier | ||
Virginia,Richmond | ||
Washington,Olympia | ||
West Virginia,Charleston | ||
Wisconsin,Madison | ||
Wyoming,Cheyenne |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
Value,Name | ||
Kind,TokenConstant | ||
1,TokenIdentifier | ||
2,TokenQuotedIdentifier | ||
3,TokenNumber | ||
4,TokenString | ||
5,TokenAnd | ||
6,TokenOr | ||
7,TokenPipe | ||
-1,TokenError |