Skip to content

Commit baa6da5

Browse files
committed
Add tests for AS keyword
1 parent f349d26 commit baa6da5

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

bql/planner/planner_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,21 @@ func TestPlannerQuery(t *testing.T) {
272272
nbs: 3,
273273
nrws: len(strings.Split(testTriples, "\n")) - 1,
274274
},
275+
{
276+
q: `select ?s as ?s1, ?p as ?p1, ?o as ?o1 from ?test where {?s ?p ?o};`,
277+
nbs: 3,
278+
nrws: len(strings.Split(testTriples, "\n")) - 1,
279+
},
275280
{
276281
q: `select ?p, ?o from ?test where {/u<joe> ?p ?o};`,
277282
nbs: 2,
278283
nrws: 2,
279284
},
285+
{
286+
q: `select ?p as ?p1, ?o as ?o1 from ?test where {/u<joe> ?p ?o};`,
287+
nbs: 2,
288+
nrws: 2,
289+
},
280290
{
281291
q: `select ?s, ?p from ?test where {?s ?p /t<car>};`,
282292
nbs: 2,
@@ -312,6 +322,11 @@ func TestPlannerQuery(t *testing.T) {
312322
nbs: 1,
313323
nrws: 4,
314324
},
325+
{
326+
q: `select ?s as ?s1 from ?test where {?s "is_a"@[] /t<car>};`,
327+
nbs: 1,
328+
nrws: 4,
329+
},
315330
{
316331
q: `select ?o from ?test where {/u<joe> "parent_of"@[] ?o. ?o "parent_of"@[] /u<john>};`,
317332
nbs: 1,

0 commit comments

Comments
 (0)