pathwaycom/pathway · error · NotImplementedError
{key}: {repr} not supported.
Error message
{key}: {repr} not supported. What it means
Every handler in Pathway's SQL translator pops the args it understands from the sqlglot node; before returning, _check_work_done scans node.args for anything left over. Any non-None remaining arg causes NotImplementedError('{key}: {repr} not supported.') naming the unhandled clause. It is Pathway's safety net for query clauses it parses but does not translate.
Source
Thrown at python/pathway/internals/sql/processing.py:649
) -> tuple[table.Table, ContextType]:
if (alias_field := node.args.pop("alias", None)) is not None:
alias = _run(alias_field, context)
assert isinstance(alias, str)
context = context.copy()
tab = tab.copy()
context[alias] = tab
return tab, context
def _check_work_done(node: sql_expr.Expression) -> None:
for key, obj in node.args.items():
if obj is None:
continue
try:
repr = obj.sql()
except AttributeError:
repr = str(obj)
raise NotImplementedError(f"{key}: {repr} not supported.")
View on GitHub (pinned to fa2f74a464)
Solutions
- Use the {key} in the message to identify which clause is unhandled, and remove or rewrite that clause
- Split the query: run the supported part in pw.sql and do ordering/limiting/reshaping with Pathway native operations
- Check the Pathway SQL docs for supported clauses; if a sqlglot upgrade shifted parsing, pin the version Pathway was tested with
Example fix
-- before (ORDER BY left unconsumed in this position)
SELECT k FROM t UNION SELECT k FROM u ORDER BY k;
# after: sort outside SQL
import pathway as pw
t = pw.sql("SELECT k FROM t UNION SELECT k FROM u")
sorted_t = t.sort(pw.this.k) Defensive patterns
Strategy: fallback
Try / catch
try:
tab = pw.sql(query)
except NotImplementedError as e:
logUnsupportedClause(str(e)) # record which {key} clause failed, feed back to query author
raise Prevention
- Keep SQL minimal: select/from/where/group-by/join only
- Move ordering, limits, and exotic clauses into native Pathway operations
When it happens
Trigger: pw.sql with clauses the specific handler doesn't consume: e.g. ORDER BY in contexts Pathway ignores, WITH (CTE) attachments on particular nodes, HAVING in unsupported positions, FETCH/ OFFSET variants, hints, or dialect-specific qualifiers on a sub-node.
Common situations: Complex analytical SQL ported from another engine; sqlglot version changes that move a clause into an arg position Pathway's handler doesn't pop; queries that parse fine but use a corner-of-the-grammar feature.
Related errors
- {node.sql()} not supported.
- PIVOTS not supported
- parsing {query} failed
- Correlated subqueries not supported.
- Currently, tantivy bm25 index is supported only in the as-of
AI-assisted analysis of pathwaycom/pathway@fa2f74a464 (2026-08-15).
Data as JSON: /api/errors/30cafc4b9e2a4281.
Report an issue: GitHub.