fix(athena): run and list queries in their workgroup #16

Merged
Zakaria merged 3 commits from fix/athena-workgroup-queries into main 2026-10-25 23:44:19 +00:00
Owner
No description provided.
Zakaria added 3 commits 2026-10-25 23:44:15 +00:00
StartQueryExecution ignored the workgroup: results always went to the default
bucket, even when the workgroup has a result location (or enforces it), and an
unknown workgroup was accepted. ListQueryExecutions ignored the WorkGroup
filter and returned every query.

Now, as in AWS, a query without a result location uses its workgroup's, an
enforcing workgroup's location always wins, an unknown workgroup is an
InvalidRequestException, and ListQueryExecutions returns the named workgroup's
queries (the primary workgroup's when none is named), newest first.
Athena runs a statement with or without its closing semicolon, but the query
engine wraps it in COPY (...) TO ..., where the semicolon is a syntax error, so
SELECT * FROM orders; always failed. Trailing semicolons are now dropped before
the statement is handed to the engine.
StateChangeReason carried the raw engine call failure, HTTP envelope and all:
floci-duck execute returned HTTP 500: {"status":"error","message":...},
ending with the statement as the engine saw it, wrapped in COPY (...) TO. It is
now the engine's own message alone, such as Catalog Error: Table with name nope
does not exist!
Zakaria merged commit 7617e1f87c into main 2026-10-25 23:44:19 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Zakaria/FlociClone#16