Skip to content

NL2SQL 0.2.2

A correctness release: a question answered from several sub-queries now gets the right answer or a clear refusal, never a silently wrong one. The live demo also moves to https://nl2sql.codewithnk.com.

Released 2026-10-11.

Highlights

  • Each sub-query writes its own result file. Before this, two sub-queries of one question could overwrite each other, and a join could combine a result with itself.
  • A join or compare is refused if it lost one of its inputs, for example to a role restriction, instead of being answered from the side that remained.
  • A join or compare is refused if one input was cut short by the row cap. Missing rows mean missing matches.
  • The hosted demo has its own domain, https://nl2sql.codewithnk.com.

What's included

Features

  • The link preview and the release checks use nl2sql.codewithnk.com, the Space's custom domain (#212).

Fixes

  • One result artifact per sub-query, at <tenant_id>/<request_id>/<sub_query_id>.parquet. A failed aggregation now ends the run instead of asking the model to explain an empty result (#213).
  • A join or compare that lost one of its inputs is refused with PLANNER_FAILED, before any query runs. The message does not name the restricted datasource (#214).
  • A join or compare on a sub-query that hit the row cap is refused with RESULT_TRUNCATED. A union on a capped input still runs, with a warning (#215).

Docs

  • The README and docs link the live demo at nl2sql.codewithnk.com (#210).

Known limits

  • Questions across several databases are not yet supported end to end. Each database answers its own sub-query and the results are joined in memory. This release makes that safer, not complete.
  • Each sub-query returns at most 1,000 rows by default (the datasource's row_limit). A join over a larger input is refused rather than answered.
  • Without a key, the hosted demo only answers the 20 guided questions it has recordings for.

Upgrading

pip install --upgrade "nl2sql-engine[demo]==0.2.2"

Breaking changes: none. The default result artifact path gains a <sub_query_id> level. A custom RESULT_ARTIFACT_PATH_TEMPLATE keeps working: the sub-query id is added to its file name.

What's next

Next: cross-database queries, so one question can be answered from several databases.

Full changelog: v0.2.1...v0.2.2