{ name: "SELECT with single FROM", statement: "SELECT a FROM table1", assert: { result: SyntaxSuccess } } { name: "SELECT star with single FROM", statement: "SELECT * FROM table1", assert: { result: SyntaxSuccess } } { name: "SELECT alias dot star", statement: "SELECT t.* FROM table1 AS t", assert: { result: SyntaxSuccess } } { name: "SELECT path alias dot star", statement: "SELECT a.b.* FROM table1 AS t", assert: { result: SyntaxSuccess } } { name: "SELECT with FROM AT", statement: "SELECT ord FROM table1 AT ord", assert: { result: SyntaxSuccess } } { name: "SELECT with FROM AS and AT", statement: "SELECT ord, val FROM table1 AS val AT ord", assert: { result: SyntaxSuccess } } { name: "SELECT with FROM id BY", statement: "SELECT * FROM table1 BY uid", assert: { result: SyntaxSuccess } } { name: "SELECT with FROM AT id BY", statement: "SELECT * FROM table1 AT ord BY uid", assert: { result: SyntaxSuccess } } { name: "SELECT with FROM AS id BY", statement: "SELECT * FROM table1 AS t BY uid", assert: { result: SyntaxSuccess } } { name: "SELECT with FROM AS and AT id BY", statement: "SELECT * FROM table1 AS val AT ord BY uid", assert: { result: SyntaxSuccess } } { name: "SELECT WHERE MISSING", statement: "SELECT a FROM stuff WHERE b IS MISSING", assert: { result: SyntaxSuccess } } { name: "SELECT list with aggregate wildcard function calls", statement: "SELECT sum(a) + count(*), AVG(b), MIN(c), MAX(d + e) FROM foo", assert: { result: SyntaxSuccess } } { name: "paths and select", statement: ''' SELECT process(t).a[0] AS a, t2.b AS b FROM t1.a AS t, t2.x.*.b WHERE test(t2.name, t1.name) AND t1.id = t2.id ''', assert: { result: SyntaxSuccess } } { name: "nested SELECT no WHERE", statement: "SELECT * FROM (SELECT * FROM x).a", assert: { result: SyntaxSuccess } } { name: "nested SELECT", statement: "SELECT * FROM (SELECT * FROM x WHERE b).a", assert: { result: SyntaxSuccess } } partiql::[ { name: "SELECT query missing FROM", statement: "SELECT a DATA", assert: { result: SyntaxSuccess }, }, { name: "SELECT with case missing FROM", statement: '''SELECT a, CASE WHEN a=1 THEN 'one' WHEN a=2 THEN 'two' ELSE 'other' END FROM test''', assert: { result: SyntaxSuccess }, }, { name: "SELECT VALUE query missing FROM", statement: "SELECT VALUE event.id", assert: { result: SyntaxSuccess }, }, { name: "SELECT with case missing FROM with WHERE eq", statement: ''' SELECT event.id WHERE event.type = 'SAVE' ''', assert: { result: SyntaxSuccess }, }, { name: "SELECT with case missing FROM with WHERE ne", statement: ''' SELECT event.id WHERE event.type != 'SAVE' ''', assert: { result: SyntaxSuccess }, } ]