# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] ### Changed - `synthesize`: the help now warns that synthetic output is not anonymized. It can copy real values and value combinations from the source, rare ones included: fully enumerated columns, enumerated structured-faker columns without `--consistent-fakes`, `joint` relationship tuples, and outliers at the edge of numeric/date ranges. ([#5064](https://github.com/dathere/qsv/pull/5064)) - `sqlp`: the `--try-parsedates` help now warns that Polars reads slash, dash and dot dates as day-first, so `01/05/2024` becomes `2024-05-01`, and that `CAST(col AS DATE)` does the same. For month-first (US) dates, leave `--try-parsedates` off and use `STRPTIME(col, '%m/%d/%Y')` ([#5062](https://github.com/dathere/qsv/pull/5062)). ## [29.0.0] - 2026-11-15 🛡️ The "Trust the numbers" Release ✅ ### Highlights ~104 commits since 28.0.0, and the theme is **correctness**. We develop qsv with the latest models from Anthropic and review every change adversarially with OpenAI's. [Codacy](https://www.codacy.com) adds one more layer of correctness review on top of that. Thanks to their generosity, we have free access to their platform. With all three, we swept several core commands for correctness: `stats` and `moarstats`, `luau`, `profile`, `scoresql`, `sqlp --format avro`, and every command that reads piped stdin. Thank you, Codacy! - **`validate --sarif` writes JSON Schema errors as a [SARIF 2.1.0](https://www.oasis-open.org/standard/sarif-v2-1-0/) log** ([#5031](https://github.com/dathere/qsv/pull/5031)). Though SARIF is typically used for static analysis of code, we're now using it to report validation errors in a standardized format, with an [example GitHub Actions workflow](https://github.com/dathere/qsv/tree/master/resources/examples/validate-sarif) that uploads them to GitHub code scanning. See the [wiki walk-through](https://github.com/dathere/qsv/wiki/Validation-and-Schema#sarif) and the [sample repo](https://github.com/jqnatividad/qsv-sarif-test) where the workflow raised code scanning alerts, including on a [pull request](https://github.com/jqnatividad/qsv-sarif-test/pull/1). This sets the stage for integrating qsv's validation capabilities into Datapusher+, CI/CD pipelines and other automated workflows. - **`stats` no longer crashes on `NaN` cells** ([#5053](https://github.com/dathere/qsv/pull/5053)). If you run `stats` on data written by pandas or numpy, upgrade. In qsv 28.0.0 and 27.0.1, `stats --median`, `--quartiles` or `--everything` panicked on a float column of a few hundred rows or more that holds a `NaN`, `nan` or `NAN` cell, which is how pandas and numpy write missing values. So did `moarstats`, which runs `stats`. On smaller columns, the `sum` came out empty and the quartiles, MAD, IQR, fences and percentiles were empty or shifted. Every numeric statistic now skips `NaN` cells, as the mean and `--quantile-method approx` already did. A `NaN` cell still counts as a value for `nullcount`, `sparsity` and `cardinality`. Also in this release: - **Piped stdin works in eleven more places.** `sample`, `cat`, `applydp`, `geocode --batch 0`, `input --skip-lastlines`, `partition`, `split --chunks`, `searchset`, `frequency`, `sniff` and `extsort` dropped rows, wrote only the header, or rejected `-` when reading from a pipe, several of them with exit 0 ([#5003](https://github.com/dathere/qsv/pull/5003), [#5005](https://github.com/dathere/qsv/pull/5005), [#5009](https://github.com/dathere/qsv/pull/5009), [#5012](https://github.com/dathere/qsv/pull/5012)). - **Maps render in sandboxed iframes** such as CKAN's Webpage view or the new [ckanext-webpageviewplus](https://github.com/dathere/ckanext-webpageviewplus). Before, every MapLibre map there stayed blank ([#5033](https://github.com/dathere/qsv/pull/5033)). - **The stats cache is no longer served stale** when `QSV_NO_HEADERS`, `QSV_STATS_SEPARATOR` or a sniffed or default delimiter changes, or after an upgrade with `--infer-dates` ([#5049](https://github.com/dathere/qsv/pull/5049), [#5051](https://github.com/dathere/qsv/pull/5051), [#5052](https://github.com/dathere/qsv/pull/5052)). - **`stats --cardinality`, `--mode` and `--everything` are 12–27% faster and use up to 36% less memory**, with and without `--weight` ([#5011](https://github.com/dathere/qsv/pull/5011), [#5013](https://github.com/dathere/qsv/pull/5013)). - **`sqlp` runs on a newer Polars** that adds correlated subqueries, `LATERAL`, `PERCENTILE_CONT`/`PERCENTILE_DISC`, `CREATE VIEW`, `BOOL_AND`, `COUNT_IF`, `MAX_BY`, `REGEXP_EXTRACT` and more. It also fixes two wrong results ([#5055](https://github.com/dathere/qsv/pull/5055) and earlier bumps). - **The MCP server's `.mcpb` bundle is half the size**, 5.6 MB instead of 11.4 MB. The 28.0.0 bundle shipped 119 development-only packages the server never loads, including typescript, c8 and three flagged minimatch copies. They are now left out ([#5014](https://github.com/dathere/qsv/pull/5014)). - **Dependency bumps for security fixes, and bundled-library updates.** - Security: - The SQLite that `to sqlite` bundles is now 3.54.1, which fixes [RUSTSEC-2026-0459](https://rustsec.org/advisories/RUSTSEC-2026-0459) ([#5022](https://github.com/dathere/qsv/pull/5022)). - The Polars bump moves to zstd 0.14, which clears 13 "unsound" advisories ([#5021](https://github.com/dathere/qsv/pull/5021)). - The MCP server takes `hono` and `@hono/node-server` security releases ([#5042](https://github.com/dathere/qsv/pull/5042), [#5043](https://github.com/dathere/qsv/pull/5043)). - Bundled libraries: - Luau is now 0.745, with native-code (`luau-jit`) crash and code-generation fixes ([#5026](https://github.com/dathere/qsv/pull/5026)). - [driver.js](https://driverjs.com), the engine behind the Data Schematic Tour, is now 1.14.0 (from 1.10.2). Enter now advances every step, and the spotlight follows elements that scroll or re-render ([#5038](https://github.com/dathere/qsv/pull/5038), [#5057](https://github.com/dathere/qsv/pull/5057)). This is a major release because some `sqlp`, `validate`, `profile --strict`, `luau` and `stats` results and exit codes change. See [Breaking Changes](#v29-breaking-changes). The MSRV is now Rust 1.100. ### ⚡ Performance Measured with qsv's benchmark suite, using the same machine, dataset and build type as 28.0.0: a Mac mini (M2 Pro, 12 cores, 32 GiB), 1M rows × 41 columns of NYC 311 data (520 MB), and the prebuilt PGO binary. Across 305 benchmarks, the median one is 1.2% faster, 69 are more than 5% faster, and 6 are more than 5% slower. Full results are in the [Benchmarks Data Schematic](https://dathere.github.io/qsv/benchmarks/). - **`stats --everything` is 12–28% faster and uses 13–24% less memory** ([#5011](https://github.com/dathere/qsv/pull/5011), [#5013](https://github.com/dathere/qsv/pull/5013)). A full pass over the dataset drops from 2.41 s to 2.02 s, and from 0.55 s to 0.39 s with an index. `stats --cardinality` is 15% faster and uses 20% less memory. Commands that run `stats` internally gain as well: `schema` is 11% faster and `synthesize` 13% faster. Plain `stats` (without `--everything` or `--cardinality`) is about 4% slower: 1.04 s → 1.08 s. - **`searchset` is 11–12% faster, uses half the CPU time, and peaks at 22 MiB instead of ~990 MiB** ([#5012](https://github.com/dathere/qsv/pull/5012)). It no longer counts every row up front unless the progress bar is on. - **`luau` scripts are 9–11% faster** with Luau 0.745 ([#5026](https://github.com/dathere/qsv/pull/5026)). `luau filter` is unchanged. - **`joinp` is 5–12% faster** with the newer Polars ([#5055](https://github.com/dathere/qsv/pull/5055) and earlier bumps). - **`to ods` is 41% faster**, taking 16.2 s instead of 27.6 s. ### 🙏 Contributors Thanks to everyone who made 29.0.0 possible: - [@acdha](https://github.com/acdha) for reporting that `sample` behaved differently on stdin ([#4999](https://github.com/dathere/qsv/issues/4999)). That report led to the stdin fixes across eleven commands. - [@mitsuhiko](https://github.com/mitsuhiko) for adding a bundled time zone database fallback to [MiniJinja](https://github.com/mitsuhiko/minijinja)'s datetime filters at our request ([mitsuhiko/minijinja#1008](https://github.com/mitsuhiko/minijinja/issues/1008)). With it, `template` handles legacy zone names such as `EST`. - [@ik1ne](https://github.com/ik1ne) for merging the zip 9 bump in [`webdriver-downloader`](https://github.com/ik1ne/webdriver-downloader) and releasing it as 0.18.0 ([ik1ne/webdriver-downloader#67](https://github.com/ik1ne/webdriver-downloader/pull/67)), which let qsv drop its fork patch --- ### Breaking Changes - **`sqlp`: `EXPLAIN` takes queries only** ([#5055](https://github.com/dathere/qsv/pull/5055), [pola-rs/polars#30798](https://github.com/pola-rs/polars/pull/30798)). `EXPLAIN DROP TABLE`, `EXPLAIN CREATE VIEW`, `EXPLAIN CREATE TABLE`, `EXPLAIN TRUNCATE TABLE` and `EXPLAIN SHOW TABLES` now fail with `EXPLAIN supports queries only`. Before, `EXPLAIN` ran such a statement to get its plan, so `EXPLAIN DROP TABLE t` dropped the table. - **`sqlp`: some results change with the Polars bump.** See the Polars entry under Changed for the full list: - `IS DISTINCT FROM` binds tighter than `AND`/`OR` ([pola-rs/polars#30367](https://github.com/pola-rs/polars/pull/30367)). - `POSITION`/`STRPOS` of a NULL string returns NULL, not `0`. String length, position and date-part functions return Int64 ([pola-rs/polars#30493](https://github.com/pola-rs/polars/pull/30493)). - A window function query with no outer `ORDER BY` may return its rows in a different order ([pola-rs/polars#30494](https://github.com/pola-rs/polars/pull/30494)). - **`validate`: rows that passed can now fail** with jsonschema 0.61.2. The `date-time`, `date` and `time` formats require digits where RFC 3339 does. `.` in `pattern` no longer matches `\r`, U+2028 or U+2029. Whole floats past 2^53 are compared exactly against numeric bounds. See Fixed for the details. - **`profile --strict` fails where it used to pass** ([#5025](https://github.com/dathere/qsv/pull/5025)). With `--validate`, it fails on a file that fails `qsv validate`, or when that pass cannot run. With or without `--validate`, it fails on an `--initial-context` override that cannot be applied. Before, all of these exited 0. - **`luau`: an END script error exits with 1** ([#5036](https://github.com/dathere/qsv/pull/5036)). Before, it printed the error and exited 0. BEGIN and MAIN script errors already exited with 1. - **`stats` output changes.** See Fixed for the details: - Every numeric statistic of a float column with `NaN` cells is now computed without them, and a column of only `NaN` cells has no sum ([#5053](https://github.com/dathere/qsv/pull/5053), [#5056](https://github.com/dathere/qsv/pull/5056)). - With `QSV_NO_HEADERS` set, fields are numbered `0`, `1`, …, as with `--no-headers`. Before, they were named after the first row while that row was also counted as data ([#5049](https://github.com/dathere/qsv/pull/5049)). - `--mode` without `--cardinality` reports `*ALL` for an all-unique column, instead of listing its values ([#5050](https://github.com/dathere/qsv/pull/5050)). - `max_precision` changes for values below 0.00001 or from 1e16 up, and no longer counts `NaN` or `inf` cells ([#5050](https://github.com/dathere/qsv/pull/5050)). - With `--weight`, a column whose rows all have a zero or negative weight has no median, quartiles, MAD or percentiles, and the `*ALL` antimode counts only rows with a positive weight ([#5050](https://github.com/dathere/qsv/pull/5050)). ### Added - **`validate --sarif `: write JSON Schema validation errors as a SARIF 2.1.0 log** ([#5031](https://github.com/dathere/qsv/pull/5031)), for code scanning tools such as GitHub code scanning. Each invalid field becomes a result. The result has a rule per JSON Schema keyword (plus `dynamicEnum`, `uniqueCombinedWith` and `ragged-row` with `--split-ragged`) and points at the line its row starts on. That line accounts for multi-line quoted fields, CRLF line endings, blank and `QSV_COMMENT_CHAR` comment lines, and `QSV_SNIFF_PREAMBLE` preambles. A compressed or converted input (e.g. `.csv.gz`) has no such line, so its results name only the file. A run that stops early (on a ragged row without `--split-ragged`, or a read error) writes no SARIF file, and removes one left by an earlier run so it can't be uploaded as current. Invalid UTF-8 doesn't stop a JSON Schema run; it is reported like any other error. The file is written even when every row is valid (with no results), so a CI run clears earlier findings. Output stops at 25,000 results by default, GitHub code scanning's limit per run, with a notification when results are cut. `--sarif-max-results ` sets another cap for tools that accept more, and 0 means no limit. The file URI is relative to the root of the git checkout the CSV is in, so results point at the right file wherever qsv runs; outside a checkout, it is relative to the current directory. A `--sarif` path that is the input CSV or the schema (including through a link) is refused. The option works only in JSON Schema mode with a file input; RFC 4180 mode and stdin reject it. The `validation-errors.tsv` report is unchanged. An example is in [`resources/examples/validate-sarif`](resources/examples/validate-sarif): a sample CSV with one error of each kind, its schema, the SARIF log qsv writes for them (a test keeps it current), and a GitHub Actions workflow that uploads it to code scanning. - **docs: "Statistics at a Glance" in [`docs/STATS_DEFINITIONS.md`](docs/STATS_DEFINITIONS.md)**: qsv compiles 159 statistic columns across `stats` (48), `moarstats` (76 + 14 bivariate), `pragmastat` (18) and `frequency` (3). A new test checks the table against real output, so the counts can't go stale silently ([#4996](https://github.com/dathere/qsv/pull/4996)). - **docs: the `viz` USAGE documents stdin input** ([#5018](https://github.com/dathere/qsv/pull/5018)). Pass `-` as `` to chart piped CSV. Every chart type accepts it except `smart`, which needs a file for its cached statistics. With `--geojson auto` or `census`, stdin is first copied to a temp file. There's also a new piped-input example. - **`profile --initial-context`: a final `-` in a `dataset_info` pointer appends to an array** ([#5025](https://github.com/dathere/qsv/pull/5025), [#4991](https://github.com/dathere/qsv/issues/4991)). For example, `/projection/hasQualityMeasurement/-` adds an agency's own quality measurement after the computed ones, so it no longer takes a second run to seed the whole array. `-` appends only to an array that exists; a numeric index still replaces the item in place. - **docs: the `profile --locate census` USAGE gives the state-column threshold** ([#5025](https://github.com/dathere/qsv/pull/5025)): a state column lists states only when at least 90% of its values are US states. ### Changed - **MSRV is now Rust 1.100** (was 1.99; [#5039](https://github.com/dathere/qsv/pull/5039)). - **`geocode`: the default index is rebuilt from current [Geonames](https://www.geonames.org) data, so some place labels differ from 28.0.0.** For example, Toronto now has an admin2 (county-level) name of "Toronto", so `%city-admin2-admin1` gives "Toronto, Toronto, Ontario" where it gave "Toronto, , Ontario". Antwerp's admin2 is now "Antwerp", not "Antwerp Province". To keep 28.0.0's labels, load that release's index with `qsv geocode index-load`. - **build: qsvlite and qsvdp no longer compile crates they don't use.** Rust 1.100's new `unused_dependencies` Cargo lint found eight dependencies that only the full `qsv` binary needs. They are now optional and turned on by the features that use them: `const_format` and `minijinja-contrib` (`feature_capable`, and `profile` for `minijinja-contrib`), `semver` (`self_update`), and `dunce`, `ext-sort`, `grex`, `hostname-validator` and `jaq-json` (`feature_capable` and `lite`). Every binary is built from the same code as before, so the lite and dp builds just compile a little faster ([#5039](https://github.com/dathere/qsv/pull/5039)). - **`viz smart`: the guided Tour's vendored [driver.js](https://driverjs.com) is now [1.14.0](https://github.com/nilbuild/driver.js/releases/tag/1.14.0)** (was 1.10.2; [1.12.1](https://github.com/nilbuild/driver.js/releases/tag/1.12.1) in [#5038](https://github.com/dathere/qsv/pull/5038), then [1.13.0](https://github.com/nilbuild/driver.js/releases/tag/1.13.0) and 1.14.0 in [#5057](https://github.com/dathere/qsv/pull/5057)): - **Enter moves to the next step on every step.** Each popover focuses Next instead of the close button, and the Tour no longer moves focus off Next on the first step. Before, Enter did nothing on the first step and ended the tour on every later one. - Escape pressed in a text field inside the spotlighted element, such as the data viewer's search box, goes to that field, and the drawer stays open. Before, it ended the tour. While a tour runs, the dictionary and data drawers leave Escape to the tour, so Escape anywhere else ends the tour and closes the open drawer, as before. - Elements inside the spotlighted area keep their own `pointer-events: none`; before, driver.js forced every one of them to `auto`. - From 1.13.0 and 1.14.0: the spotlight and popover cover only the part of an element that is in view, so an element wider than its scrolling container is highlighted inside it. The highlight follows a panel that scrolls inside the page, and a step follows its element when the page re-renders it. The popover scrolls into view only as far as it needs to. - The bundle is larger: each Tour page embeds about 12.5 KB more (gzip + base64). The embedded payloads, the `QSV_VIZ_CDN` jsDelivr URLs and their SRI digests are updated together, and every gallery Data Schematic is regenerated with them. - **deps: the `webdriver-downloader` fork patch is gone** ([#5027](https://github.com/dathere/qsv/pull/5027)). [ik1ne/webdriver-downloader#67](https://github.com/ik1ne/webdriver-downloader/pull/67) (zip 9) was merged and released as 0.18.0. qsv's `plotly` pin moves to `dathere/plotly` rev [`d43be37`](https://github.com/dathere/plotly/commit/d43be3786c32ab2790a6c0e927ee39d2bb99704c), whose `plotly_static` build dependency requires 0.18, so `webdriver-downloader` now comes from crates.io. The fork was added in [#4828](https://github.com/dathere/qsv/pull/4828) because every zip 8.x was yanked. - **deps: other bumps**: `calamine` 0.38 (used by `excel` and `describegpt`'s spreadsheet context files), `rfd` 0.18 (used by `prompt`), `toml` 1.2. `csvlens` (used by `lens`) now comes from a fork of [YS-L/csvlens](https://github.com/YS-L/csvlens) with updated dependencies. - **`luau`: Luau bumped to [0.745](https://github.com/luau-lang/luau/releases/tag/0.745)** (from 0.740, [#5026](https://github.com/dathere/qsv/pull/5026)). `luau0-src` 0.23.0+luau745 needs an unreleased mlua-sys, so `mlua` is patched to upstream rev [`a0ad453`](https://github.com/mlua-rs/mlua/commit/a0ad4535fc72ba89967a931c5be57b162b5f0f3f) until an mlua release includes it. The crate versions are unchanged (mlua 0.12.2, mlua-sys 0.13.0). The yank that reverted the 0.744 bump (#4923) is resolved: 0.23.0 replaces the yanked 0.22.1+luau744. - **Native code (`luau-jit`) fixes** ([0.744](https://github.com/luau-lang/luau/releases/tag/0.744)): an Arm64 crash in functions with more than 256 constants, a dead-store-elimination bug, a `FORGLOOP` register reservation bug, and `bit32`/integer correctness fixes (`lrotate`, `extract`, `replace`). - **Faster:** `string.gsub` with patterns that have no special characters (0.742), `table.find` (0.743), and `table.create`/`table.clear` as fast calls (0.745). - **`profile --validate --strict` fails on a file that fails `qsv validate`** ([#5025](https://github.com/dathere/qsv/pull/5025)). Before, an input with inconsistent field counts or quoting, or invalid UTF-8, passed `--strict`: it was recorded only as a `syntacticValidity` measurement of `"false"`. It now also gets a Required `syntacticValidity` warning in `projection_warnings`, and `--strict` fails on it. The same happens when the `qsv validate` pass cannot run, since `profile` can then not vouch for the file. - **`profile --strict` fails when an `--initial-context` override cannot be applied, with or without `--validate`** ([#5025](https://github.com/dathere/qsv/pull/5025), [#4991](https://github.com/dathere/qsv/issues/4991)). See Fixed. - **`stats`: `--cardinality`, `--mode` and `--everything` are faster and use less memory** ([#5011](https://github.com/dathere/qsv/pull/5011)). qsv-stats 0.57 stores short values inline when counting them (`ByteKey`). On a 1M-row file, `--cardinality --mode` is 16–27% faster, and `--everything` on an indexed file is 27% faster with 34% less peak memory. Output is unchanged; default `stats` is unaffected. On big-endian targets (s390x), values of 128 bytes or more were misread until a compact_bytes fix ([#5015](https://github.com/dathere/qsv/pull/5015)), so this was never released with the bug. - **`stats --weight`: mode, antimode and cardinality tracking is faster and uses less memory** ([#5013](https://github.com/dathere/qsv/pull/5013)). The weighted tracker now stores short values inline too, as #5011 did for unweighted `stats`. On a 1M-row file with `--weight`, `--cardinality --mode` is 12–20% faster, and `--everything` on an indexed file is 21–23% faster with 36% less peak memory. Output is unchanged. - **`scripts/benchmarks.sh` 10.1.1: the `joinp` benchmarks check their exact row counts** ([#4997](https://github.com/dathere/qsv/pull/4997)). Before, three of them only checked for at least one output row and `joinp_left_anti` had no check, so a partial join could be published as a speedup. Now inner and `--streaming` must return 883,470 rows, `--left` all 1,000,000, and `--left-anti` 116,530 (cross-checked with `qsv join` and DuckDB). - **`scripts/benchmarks.sh` 10.1.2: the `sqlp` and `frequency` benchmarks check their results** ([#5019](https://github.com/dathere/qsv/pull/5019)). An empty or partial result that still exits 0 is now quarantined, not published as a speedup. - The 25 `frequency` benchmarks require every field's counts to add up to the row count, and every selected column to be present. - 13 `sqlp` benchmarks must return the exact expected rows or groups (cross-checked with DuckDB), in CSV, JSON, JSONL, Parquet and Arrow output. - Also fixed: an output check on a benchmark that has a `--conclude` or `--cleanup` hook checked the hook's output instead, because hyperfine writes it to the same file. - **deps: Polars bumped to upstream rev [`2d9938d`](https://github.com/pola-rs/polars/commit/2d9938dfa3558a89c5d7a05d4ff1b0e5afccfd59)** (from `py-2.1.0`, 283 commits: `0b47007` in [#4993](https://github.com/dathere/qsv/pull/4993), `a598c51` in [#5021](https://github.com/dathere/qsv/pull/5021), `a9bce97` in [#5030](https://github.com/dathere/qsv/pull/5030), `ff1b37d` in [#5034](https://github.com/dathere/qsv/pull/5034), `8ecd1ca` in [#5041](https://github.com/dathere/qsv/pull/5041), `61fdb30` in [#5045](https://github.com/dathere/qsv/pull/5045), `36ea0f9` in [#5048](https://github.com/dathere/qsv/pull/5048), then `2d9938d` in [#5055](https://github.com/dathere/qsv/pull/5055)). The `2d9938d` step is 8 commits. Its one `sqlp` change: `EXPLAIN` now takes queries only ([#30798](https://github.com/pola-rs/polars/pull/30798)). Before, `EXPLAIN` over another statement ran it to get a plan, so `EXPLAIN DROP TABLE t` in a script dropped the table and `EXPLAIN CREATE VIEW ...` created the view; these now fail with `EXPLAIN supports queries only`, as do `EXPLAIN CREATE TABLE`, `EXPLAIN TRUNCATE TABLE` and `EXPLAIN SHOW TABLES`. It also has two speedups: group-bys skip hashing and table lookups for runs of equal string keys ([#30794](https://github.com/pola-rs/polars/pull/30794)), and dictionary casts and sorted searches copy less ([#30790](https://github.com/pola-rs/polars/pull/30790)). No `sqlp` or `pivotp` result changed in side-by-side tests of `GROUP BY`s, joins and window functions over sorted and clustered string keys (with and without `--streaming`), and of every `pivotp` aggregation. A pivot fix for `pl.element()` inside `eval` aggregations ([#30781](https://github.com/pola-rs/polars/pull/30781)) doesn't apply: `pivotp` builds no `eval` aggregations. The other commits are Python- or Iceberg-only, or need a polars feature qsv doesn't enable (`rolling_*_by`, [#30795](https://github.com/pola-rs/polars/pull/30795)). The `36ea0f9` step is 17 commits and changes no `sqlp` result that already worked. It adds SQL that used to fail: comma-separated `LATERAL` derived tables, and aggregates without `GROUP BY` inside them (`FROM t, LATERAL (SELECT MAX(v) FROM t2 WHERE t2.k = t.k) a, LATERAL (...) b`; [#30768](https://github.com/pola-rs/polars/pull/30768)); `CREATE VIEW`, `DROP VIEW` and `DESCRIBE ` ([#30778](https://github.com/pola-rs/polars/pull/30778)); and a leading `~` in `read_csv`/`read_parquet`/`read_ipc`/`read_ndjson` paths now means the home directory ([#30774](https://github.com/pola-rs/polars/pull/30774)). Date parts are now computed with integer arithmetic ([#30777](https://github.com/pola-rs/polars/pull/30777)); every `EXTRACT` field gave the same result on both revs for 21,260 dates and timestamps from year 1 to 9999. Arithmetic with a literal on the left now plans with the type it runs with ([#30765](https://github.com/pola-rs/polars/pull/30765)), and temporal `total_*` overflows give NULL ([#30743](https://github.com/pola-rs/polars/pull/30743)); neither changed a `sqlp` result in side-by-side tests. The `61fdb30` step is 11 commits. Its one `sqlp` result change is a fix: a signed integer literal combined with an unsigned value no longer gives NULL for the negative rows ([#30742](https://github.com/pola-rs/polars/pull/30742)). For example, `CASE WHEN side = 'buy' THEN 1 ELSE -1 END * CAST(qty AS UINTEGER)` returned NULL for the `-1` rows, so a `SUM` over it skipped them. It also adds `BOOL_AND`, `BOOL_OR`, `COUNT_IF`, `MAX_BY`, `MIN_BY`, `ANY_VALUE`, `APPROX_COUNT_DISTINCT` and `REGEXP_EXTRACT` to `sqlp` ([#30763](https://github.com/pola-rs/polars/pull/30763)); qsv now enables polars' `approx_unique` feature for `APPROX_COUNT_DISTINCT`. `REGEXP_EXTRACT(s, pattern[, group])` returns the whole match or the given capture group, and an empty string when nothing matches. The other fixes left `sqlp` results unchanged in side-by-side tests: calendar-part offsets applied in one step ([#30744](https://github.com/pola-rs/polars/pull/30744), checked with month-end `INTERVAL` arithmetic), and population variance of a single null in a sorted group-by ([#30747](https://github.com/pola-rs/polars/pull/30747); `sqlp`'s `VARIANCE`/`STDDEV` are the sample forms, which this doesn't touch). The `8ecd1ca` step is 14 commits of performance work: quantiles and medians computed by selection instead of sorting, in parallel ([#30569](https://github.com/pola-rs/polars/pull/30569), [#30570](https://github.com/pola-rs/polars/pull/30570)), multi-column join and group-by keys packed into fixed-width integers ([#30708](https://github.com/pola-rs/polars/pull/30708)), and joins that skip the probe side when the build side has no non-null keys ([#30692](https://github.com/pola-rs/polars/pull/30692)). No `sqlp` result changed in side-by-side tests of quantiles, medians, `NTILE`/`PERCENT_RANK`, multi-key `GROUP BY`s and joins, and joins on all-NULL keys. The `ff1b37d` step is 10 commits. Its one `sqlp` result change is a fix: a `CASE` whose `ELSE` applies a strict `CAST` no longer fails on values from rows that take an earlier branch ([#30682](https://github.com/pola-rs/polars/pull/30682)). For example, `CASE WHEN a THEN 0 ELSE CAST(COALESCE(v, -1) AS UTINYINT) END` used to fail when `v` was NULL only in rows where `a` is true. The rest is Decimal `SUM`/`AVG` and Parquet string decoding speedups ([#30704](https://github.com/pola-rs/polars/pull/30704), [#30632](https://github.com/pola-rs/polars/pull/30632)), and slice pushdown and unnest fixes that left `sqlp` results unchanged in side-by-side tests. The `a9bce97` step is 11 commits of join planning and performance: out-of-core joins ([#30679](https://github.com/pola-rs/polars/pull/30679)), join reordering ([#30680](https://github.com/pola-rs/polars/pull/30680), [#30694](https://github.com/pola-rs/polars/pull/30694)), a streaming build-side choice from estimated row counts ([#30681](https://github.com/pola-rs/polars/pull/30681)), and a fix for order relaxation in sliced maintain-order joins ([#30684](https://github.com/pola-rs/polars/pull/30684)). No `sqlp` result changed in side-by-side tests. Dividing a number by a date or timestamp still fails, now with a clearer message when the schema is resolved ([#30163](https://github.com/pola-rs/polars/pull/30163)). The `a598c51` step is mostly performance, including a faster CSV reader ([#30639](https://github.com/pola-rs/polars/pull/30639)) and spillable streaming joins; no `sqlp` result changed in side-by-side tests. Crates stay 0.55.1; it moves to zstd 0.14 ([#30316](https://github.com/pola-rs/polars/pull/30316)), so the 13 zstd "unsound" advisory ignores (#4930–#4942) are dropped from `.cargo/audit.toml`. Some `sqlp` results that already worked change: - **`IS DISTINCT FROM` binds tighter than `AND`/`OR`** ([#30367](https://github.com/pola-rs/polars/pull/30367)). `a IS DISTINCT FROM b AND c OR d` is now `((a IS DISTINCT FROM b) AND c) OR d`; before, the `AND`/`OR` became part of the right operand. - **`POSITION`/`STRPOS` of a NULL string is NULL**, not `0` ([#30493](https://github.com/pola-rs/polars/pull/30493)). String length, position and date-part functions also return Int64. - **Known issue: `COUNT(*)` over a `UNION ALL ... LIMIT` panics again** (`not implemented for dtype UInt128`). The #30150 fix regressed in [#30363](https://github.com/pola-rs/polars/pull/30363); reported as [pola-rs/polars#30523](https://github.com/pola-rs/polars/issues/30523). Workaround: count a column (`COUNT(g)`) instead of `COUNT(*)`, or add an `ORDER BY` inside the limited union. (`COUNT(*)` over a `UNION ALL` without `LIMIT` panicked on py-2.1.0 too.) - **A window function query with no outer `ORDER BY` may return rows in a different order** ([#30494](https://github.com/pola-rs/polars/pull/30494)). Add an `ORDER BY` if you depend on row order. - **New SQL:** join keys of different numeric types ([#30401](https://github.com/pola-rs/polars/pull/30401)); correlated subqueries with any outer condition, `GROUP BY`, `HAVING`, `LIMIT`, `ANY`/`ALL`, and `LATERAL` derived tables ([#30378](https://github.com/pola-rs/polars/pull/30378), [#30453](https://github.com/pola-rs/polars/pull/30453), [#30466](https://github.com/pola-rs/polars/pull/30466), [#30459](https://github.com/pola-rs/polars/pull/30459), [#30490](https://github.com/pola-rs/polars/pull/30490), [#30467](https://github.com/pola-rs/polars/pull/30467)); `PERCENTILE_CONT`/`PERCENTILE_DISC ... WITHIN GROUP` ([#30442](https://github.com/pola-rs/polars/pull/30442)); non-literal `LIKE` patterns ([#30364](https://github.com/pola-rs/polars/pull/30364), [#30372](https://github.com/pola-rs/polars/pull/30372)); typed numeric/string literals ([#30486](https://github.com/pola-rs/polars/pull/30486)); `LIMIT`/`OFFSET` expressions such as scalar subqueries ([#30425](https://github.com/pola-rs/polars/pull/30425)); repeated unnamed constants ([#30488](https://github.com/pola-rs/polars/pull/30488)); `RANDOM()`, `REPEAT`, `CARDINALITY`, constant `GROUP BY` keys and row values in `IN (subquery)`. ### Fixed - **`stats`: a `NaN` cell in a float column is skipped by every numeric statistic** ([#5053](https://github.com/dathere/qsv/pull/5053)). A `NaN`, `nan` or `NAN` cell is read as a float (pandas and numpy write missing values this way). The mean already skipped it, but the `sum` came out empty, and the exact median, quartiles, IQR, MAD, fences, skewness and percentiles were computed with it. On a column of a few hundred rows or more that crashed `stats` (qsv 28.0.0 exits with a panic on `stats --quartiles`, as does `moarstats`, which runs it); on a smaller one they came out empty or shifted. With `--weight`, one such cell emptied the weighted mean and standard deviation of the whole column. They now all skip it, as `--quantile-method approx` already did, so the statistics are those of the column's other values. The cell still counts as a value: `nullcount`, `sparsity` and `cardinality` are unchanged, and the column stays Float. That holds when the other values are all integers too: such a column is summarized as floats, so its minimum and maximum read `1.0` and not `1`, and its sum is no longer exact past 2^53. A column whose cells are all `NaN` has no sum, as it has no mean ([#5056](https://github.com/dathere/qsv/pull/5056)). `inf` cells are unchanged. - **`stats`: the cache follows the delimiter set by `QSV_SNIFF_DELIMITER` and `QSV_DEFAULT_DELIMITER`** ([#5052](https://github.com/dathere/qsv/pull/5052)). The stats cache recorded only the `--delimiter` flag. A semicolon-separated `data.csv` read as one comma-delimited column kept that one-column cache after `QSV_SNIFF_DELIMITER` was set, so `stats` and the commands that read its cache went on describing the wrong columns. The cache now records the delimiter the file was read with, and `stats` and its readers compare against the delimiter they resolve the same way. Checking the cache still does not decompress a compressed or Parquet input. A cache written before this change did not record the delimiter it was read with, so it is recomputed on its next use. - **`moarstats`: two `QSV_STATS_SEPARATOR` fixes** ([#5051](https://github.com/dathere/qsv/pull/5051)): - **`mode_zscore` is computed for a column with several modes under any separator.** The first mode was looked up by splitting on `|`, so with another separator a multi-modal numeric column had an empty `mode_zscore`. - **A stats CSV written with another separator is recomputed.** Before, its percentile cells could not be split, so `kelly_skewness` and `percentile_ratio_90_10` were left out without a warning. `moarstats` now reads the separator recorded in the stats cache metadata (#5049) and reruns `stats` when it differs, with a warning. A stats CSV that has no metadata file is used as it is. - **`stats`: three stale-cache fixes** ([#5049](https://github.com/dathere/qsv/pull/5049)): - **`QSV_NO_HEADERS` now counts for the stats cache and the field names.** Before, the cache only recorded the `--no-headers` flag, so stats computed with the header row as names were served to a run that set the environment variable (and the reverse). A run with the variable also named the fields after the first row while counting that row as data; it now numbers them `0`, `1`, ... as `--no-headers` does. The commands that read the stats cache check it against the same resolved setting, so `sortcheck` and `extsort` still use a cache built under the variable. - **`stats` recomputes when `QSV_STATS_SEPARATOR` changes.** Before, it served its cache written with the previous separator, so modes, antimodes and percentiles kept the old one. This covers `stats` itself; `moarstats` still reads an existing `.stats.csv` as it is. - **`--infer-dates` sniffs the date columns again after a qsv upgrade.** With the default `--dates-whitelist sniff`, the column list sniffed by the previous version was reused for the recompute that the upgrade triggers, and saved into the new cache. It stayed until the file changed or `--force` was used. - **`stats`: wrong `max_precision`, weighted quantiles and `*ALL` antimodes** ([#5050](https://github.com/dathere/qsv/pull/5050)): - **`max_precision` is right for very small and very large floats.** A value below 0.00001 or from 1e16 up was miscounted: `0.000001` reported 4 decimal places, and `1e21` reported 5. They now report 6 and 1. `NaN` and `inf` cells no longer count toward it. - **`--weight`: a column whose rows all have a zero or negative weight has no median, quartiles, MAD or percentiles.** Before, these fell back to the unweighted values, next to a weighted mean of 0. Weighted runs also use less memory: they no longer keep a second, unweighted copy of each numeric column (8 bytes per row). - **`--weight`: the `*ALL` antimode counts only rows with a positive weight.** Before, one zero-weight row made an all-unique, equally weighted column list every value as a mode. - **`--mode` without `--cardinality` reports `*ALL` for an all-unique column.** Before, it listed the values (`*PREVIEW: ...` past 10) and gave their number as `antimode_count`; `*ALL` appeared only with `--cardinality` or `--everything`. A column with no rows no longer reports `*ALL`. - **`viz smart`: category-axis labels no longer land under the wrong bar when the categories look like numbers.** ([#5047](https://github.com/dathere/qsv/pull/5047)) Frequency bars, measure-by-dimension bars, the Top Relationships lollipop and funnels set their axis labels with `tickvals` holding each category's *position* (0, 1, 2…). Plotly.js matches a category-axis tickval against category *names* first, so on an axis of codes like `day_of_week` (`6, 7, 5, …, 0`) the label for position 0 went under category "0", and so on. Hovering a bar showed one value while the axis said another, and labels that collided were dropped. `tickvals` now hold the category values themselves. This needed `Axis::tick_values` to accept strings, so qsv's `plotly` pin moves to `dathere/plotly` rev [`b652677`](https://github.com/dathere/plotly/commit/b652677502d667edb2caa09dc930a6fe294ce3f4). The gallery Data Schematics are regenerated. - **docs: `sqlp`, `joinp` and `schema` USAGE corrections** ([#5046](https://github.com/dathere/qsv/pull/5046)). `sqlp`'s `<=>` is NULL-safe equality (the same as `IS NOT DISTINCT FROM`: true when both sides are equal or both are NULL, never NULL), not a -1/0/1 "spaceship" comparison. A Polars schema file is named after the full input file name, so `data.csv`'s is `data.csv.pschema.json`, not `data.pschema.json`. - **`luau`: fixes from a review of `luau.rs`** ([#5036](https://github.com/dathere/qsv/pull/5036)): - **An existing `./date.lua` is no longer overwritten and deleted.** A script using `require "./date"` made qsv write the bundled LuaDate over any `date.lua` in the current directory, then delete it at exit. An existing file is now used as-is and left alone. The bundled copy is also removed when the run fails; before, a failed run left it behind. - **`luau filter` no longer keeps every row after the first error.** The keep check looked at the running error count, so after one row errored, every later row was kept whatever it returned. An errored row is still kept. - **`qsv_insertrecord()` rows have the output's width.** It padded and truncated to the input's column count (and let one extra value through), so the inserted row was right only for `map` with exactly one new column. With two new columns, under `filter`, or with too few values, the run failed with `found record with N fields`. With `--no-headers` and unnamed columns, an insert from the MAIN script takes the mapped row's width; one from BEGIN still assumes a single new column, since no row has been mapped yet. - **After a MAIN-script `qsv_insertrecord()`, later rows no longer each get a blank inserted row.** - **`qsv_insertrecord()` keeps numbers and booleans.** They were written as empty fields; `qsv_insertrecord("p", 42, true)` now writes `p,42,true`. - **`luau map --remap` works with a single return value for one new column.** Only table returns dropped the input columns, so `map c --remap 'return a * 2'` failed with a field-count error. (A single value for two or more new columns still fails, with or without `--remap`; return a table.) - **An END script error now exits with 1**, like BEGIN and MAIN errors. Before, it printed the error and exited 0. - **The END script's output is printed with `--progressbar`.** It was dropped whenever the progress bar was on. - **Script keywords are matched as whole words.** A column whose name contains `return` (e.g. `returns`) no longer stops qsv adding the implicit `return` to a one-expression script. A column whose name contains `_INDEX` or `_LASTROW` (e.g. `PRICE_INDEX`) no longer switches on random-access mode, which needs an index. - The random-access progress bar's length is now the row count; it was the starting row. - **`viz`: map panels now load in a sandboxed frame without `allow-same-origin`** ([#5033](https://github.com/dathere/qsv/pull/5033), [#4946](https://github.com/dathere/qsv/issues/4946)), such as the CKAN Webpage view the wiki recommends (`sandbox="allow-scripts allow-popups allow-downloads"`). Before, every MapLibre map (`viz map`, `viz choropleth --map`, and the point and region maps in a Data Schematic) stayed blank there with no error. The MapLibre in plotly.js 3.x drops messages between the page and its web worker when their origins differ, and in such a frame the page reports its URL's origin while the worker reports `"null"`. Each page now carries a small `Worker` wrapper that gives those messages the origin MapLibre already accepts for `file://` pages. It only acts in a sandboxed frame that isn't a `file://` page, so maps elsewhere behave as before. Checked in Chrome, Firefox and Safari, for region and clustered point maps. The note added in [#4947](https://github.com/dathere/qsv/pull/4947) above each map in such a frame is gone, since the maps now render. The wrapper can go once plotly.js bundles MapLibre 6.17 or later ([maplibre-gl-js#8912](https://github.com/maplibre/maplibre-gl-js/pull/8912)). - **`validate` is stricter and more correct with jsonschema 0.61.2** (from 0.60.2). Rows that passed before can now fail: - **`format: "date-time"`, `"date"` and `"time"` require a digit wherever RFC 3339 does** ([jsonschema#1829](https://github.com/Stranger6667/jsonschema/issues/1829)). Before, `+`, `,`, `-`, `.` or `/` passed in many digit positions, so `2026-11-0/T10:00:00Z` and `-----11-06T10:00:00Z` were valid date-times. - **Numeric keywords judge whole floats past 2^53 correctly** ([jsonschema#1825](https://github.com/Stranger6667/jsonschema/issues/1825)). A float equal to an integer bound past 2^53 was converted to the wrong integer, so `exclusiveMinimum` admitted the bound itself and `const` rejected it. - **`.` in `pattern` and `patternProperties` no longer matches `\r`, U+2028 or U+2029**, so a value containing one of these line terminators can now fail a pattern it passed before. - **Schema fixes:** `oneOf`/`anyOf` no longer reject valid rows when a branch's `$ref` sits under an `$id`, and `$ref` pointers through a numeric key (`#/responses/200`) now resolve the references under their target. - Validation is slightly faster. On the 1M-row NYC 311 sample (release build; a 41-property schema with type, length, enum and range checks), `validate` executes 3.7–4.0% fewer instructions when every row is valid, and 2.6–2.7% fewer with one error per row. That makes it 2–3% faster with `--jobs 1`, with no measurable wall-clock change at the default thread count. Upstream's larger figures (up to 40% with `preserve_order`) are best cases for the validation call itself; these are end-to-end results on this file. - **Large bounded counts over one character class compile and work** (0.61.1). Patterns such as `^.{0,262144}$` or `[^\p{C}]{1,2048}` are no longer unrolled, so they fit the default `--size-limit`. One such as `^.{0,404600}$` no longer fails with a regex engine error on an empty value once `--size-limit` is raised to compile it. Anchored character-class patterns such as `^[a-z0-9-]+$` are also matched without a regex engine. This needs no change to the schema. These speedups weren't measured on qsv's benchmark file, whose schema has no patterns. - **`scoresql` no longer marks down well-formed queries** ([#5028](https://github.com/dathere/qsv/pull/5028)): - **Join keys are found when `ON` starts a line or the keys are unqualified** (`JOIN b\nON a.id = b.id`, `ON id = id2`). Before, such joins were reported as "possible cartesian join" and lost 25 points. A join inside a subquery ends at the subquery's closing parenthesis, so outer-query columns aren't scored as join keys. - **`WHERE` and `ORDER BY` are matched as whole words when collecting their columns.** In `SELECT nowhere FROM w WHERE ...`, the `WHERE` inside `nowhere` was taken for the clause, so no WHERE columns were found and the data-distribution and skew checks skipped them. - **Filter selectivity says when it scored only one of a column's values.** Only a column's first literal is looked up (`status = 'a' OR status = 'b'` checks `'a'`); the detail now notes "has 2 filter values — selectivity estimated from the first value only". - **A CTE body is not a nested subquery.** `WITH c AS (SELECT ...)` lost 2 points with the advice to use a CTE. A subquery inside a CTE still counts. - **A String column is penalized only when the query treats it as a number.** Every String column in a comparison lost 3 points, so `WHERE name = 'Bob'` was told to cast `name`. Now only a String column compared with a numeric literal is penalized. - **`--duckdb` handles column references qualified by a table name** (`SELECT data.id FROM data JOIN ...`). Table names were rewritten to `read_csv_auto(...)` in the SQL text, so DuckDB rejected the query. Each input is now registered as a view under its table name and `_t_N` alias. A bare table name that isn't a plain identifier (`FROM nyc-311`, as `describegpt` writes it when scoring) is quoted for DuckDB, so it still works. - **An index is found for any file extension.** Only `.csv.idx` was checked, so `data.tsv` was reported as unindexed even after `qsv index data.tsv`. The suggestion to run `qsv index` now says what the index is for: it speeds up building the stats and frequency caches, but Polars and DuckDB don't use it for the query. It is no longer shown for stdin input, which is a temp copy deleted on exit. - The "full table scan in query plan" check is removed. It looked for `FULL SCAN` or `TABLE SCAN`, which neither Polars (`Csv SCAN`) nor DuckDB (`READ_CSV_AUTO`) prints, so it never applied. The plan is still shown in the report, and the USAGE text no longer lists it as a scoring factor. - **`profile --validate --no-projection` warns that `--validate` is ignored**. `--validate` checks the projection block, so with `--no-projection` it ran nothing (neither the schema check nor the `qsv validate` pass) and exited 0 without a word, even with `--strict`. To check the file alone, run `qsv validate`. - **`profile`: an `--initial-context` override that cannot be applied is reported, not silently dropped** ([#5025](https://github.com/dathere/qsv/pull/5025), fixes [#4991](https://github.com/dathere/qsv/issues/4991)). Before, the run exited 0, passed `--strict`, and left no trace of the missing value. Each such override now gets a Required `projection_warnings` entry (on stderr with `--no-projection`) naming the key and the reason, and fails `--strict`: - a key that is not a JSON Pointer (doesn't start with `/`); - an array index out of range, e.g. `/projection/dataset/1/...` on a one-Dataset catalog; - a non-numeric token inside an array, e.g. `/projection/dataset/title` with `--catalog`; - a `-` with no array to append to. Before, a `-` under a missing or object parent wrote a `"-"` key where an array was meant. - **`sqlp --format avro` writes every result type** ([#5024](https://github.com/dathere/qsv/pull/5024), fixes [#5020](https://github.com/dathere/qsv/issues/5020)). Polars' Avro writer rejected a lot of result types, and any one of them failed the whole write with `not yet implemented: write ... to avro`: - **Rejected types:** `TINYINT`/`SMALLINT`, every unsigned integer, `TIME`, intervals, `TIMESTAMPTZ` and `TIMESTAMP(9)`. - **After `--cache-schema`:** the cached schema makes every non-negative integer column unsigned, so a single `--cache-schema` run broke every later Avro export of that file. - **Now:** small and unsigned integers become int or long (a value above 2⁶³−1 is an error), zoned timestamps become UTC timestamps (the same instant), nanosecond timestamps become microseconds, and `TIME` and durations become strings (`HH:MM:SS[.fraction]` and ISO 8601), including inside lists. - **Still not converted:** struct columns from nested Parquet/Arrow input. - **security: the bundled SQLite is updated to 3.54.1** ([#5022](https://github.com/dathere/qsv/pull/5022), [RUSTSEC-2026-0459](https://rustsec.org/advisories/RUSTSEC-2026-0459), CVE-2026-119375). It's used by `to sqlite`. Older SQLite could return uninitialized memory when opening a database next to a crafted `-wal` file written by someone else. The fix comes from `rusqlite` 0.41 / `libsqlite3-sys` 0.39, through the `csvs_convert` fork. - **`sample`: `--cluster`, `--weighted`, `--systematic` and fractional sample sizes work from stdin** ([#5003](https://github.com/dathere/qsv/pull/5003), fixes [#4999](https://github.com/dathere/qsv/issues/4999)). They returned only the header row, because they read the input twice (a row count or a second pass) and stdin can only be read once. For those methods, stdin is now copied to a temporary file first, which needs temp-directory space for the whole input. `--bernoulli`, `--stratified`, `--timeseries`, and integer sizes for the default method, `--varopt` and `--mergeable-reservoir` still stream stdin. - **`cat rows`/`rowskey`/`columns` read piped stdin when no input is given** ([#5005](https://github.com/dathere/qsv/pull/5005)). Before, `... | qsv cat rows` failed with "No data on stdin" unless you passed `-`. As with `headers`, `cat` with no input in an interactive terminal now waits for input. With an empty or closed stdin (cron, CI, `xargs`), it still fails with "No data on stdin", as in 28.0.0 ([#5007](https://github.com/dathere/qsv/pull/5007)), so a script whose file list comes up empty still gets an error. - **`cat rowskey` writes nothing for empty input** ([#5008](https://github.com/dathere/qsv/pull/5008)). It wrote a lone `""` header line for an empty file or an empty `-` stdin, where `rows` and `columns` write nothing. With `--group`, the grouping column's header is still written. - **`applydp --batch 0` works from stdin** ([#5005](https://github.com/dathere/qsv/pull/5005)). It counted rows first, which consumed stdin and left only the header; it now reads stdin in one batch, as `py` does. - **`geocode --batch 0` no longer drops rows from piped stdin** ([#5009](https://github.com/dathere/qsv/pull/5009)). Counting rows to size the batch consumed the stream, so rows past the first 128 KiB were silently lost, with exit 0 (also in 28.0.0). It now reads stdin in one batch without counting, as the `census` and `geoclient` back ends already did. - **`template`: legacy time zone aliases such as `"EST"` and `"US/Eastern"` work on every system** ([#5010](https://github.com/dathere/qsv/pull/5010), via [minijinja#1008](https://github.com/mitsuhiko/minijinja/issues/1008)). `datetimeformat(tz=...)` failed with "unknown timezone" where the OS time zone database lacks them, e.g. Ubuntu 26.04 without `tzdata-legacy`. qsv now bundles the time zone database as a fallback (about 200 KiB); OS data still takes precedence. - **`input --skip-lastlines` works from stdin** ([#5012](https://github.com/dathere/qsv/pull/5012)). It counted the rows first, which consumed stdin, so it wrote no rows (exit 0, also in 28.0.0). Stdin is now saved to a temp file when the flag is set. - **`partition` and `split --chunks` work with `-` for stdin** ([#5012](https://github.com/dathere/qsv/pull/5012)). Only stdin with no input argument was saved to a temp file, so with `-` `partition` wrote no files and `split --chunks` wrote a single chunk, both exit 0, or failed with a CSV error on larger input (also in 28.0.0). - **`searchset` no longer fails on large piped input** ([#5012](https://github.com/dathere/qsv/pull/5012)). It always counted rows with a second reader, which consumed stdin past the first ~64 KiB (also in 28.0.0). It now counts only for the progress bar, and `--json` reports the rows it read. - **`frequency` shows `` for all-unique columns from stdin** ([#5012](https://github.com/dathere/qsv/pull/5012)). Only `--json` output saved stdin to a temp file, so CSV output listed the column's values instead (also in 28.0.0). Stdin is now always saved to a temp file. - **`sniff -` and `extsort -` read stdin** ([#5012](https://github.com/dathere/qsv/pull/5012)). `-` was treated as a file path ("No such file or directory"); omitting the input already worked. - **`to`: clearer error when no input is given** ([#5005](https://github.com/dathere/qsv/pull/5005)). It said "No data on stdin" even when data was piped. It now says no input CSV was given and to use `-` to read stdin. - **tests: `template_contrib_functions` no longer depends on the legacy `EST` zone alias** ([#5002](https://github.com/dathere/qsv/pull/5002)). `ubuntu-latest` is now Ubuntu 26.04, which ships aliases such as `EST` and `US/Eastern` only in the optional `tzdata-legacy` package, so the test failed on every Linux run. It now uses `Etc/GMT+5` (the same fixed UTC−5 offset). If you use `datetimeformat(tz=...)` in `template`, prefer canonical IANA names for the same reason. ### CI/Actions - **The `scoresql --duckdb` tests run in CI** ([#5029](https://github.com/dathere/qsv/pull/5029)). They look for `duckdb` on `PATH` and were skipped in every job, since no workflow installed it. The macOS Polars workflow now does. - **`joinp_ignore_case_maintain_order_left` no longer asserts the order of tied matches** ([#5023](https://github.com/dathere/qsv/pull/5023)). `--maintain-order left` orders only by the left row. After the Polars `a598c51` bump, the test failed about a third of the time. It now checks the left order exactly and the matched rows as a set. - **qsvlite and qsvdp build without dead-code warnings** ([#5040](https://github.com/dathere/qsv/pull/5040)). Items those binaries never use are now gated like their callers, and the full `qsv` and `qsvmcp` builds compile exactly as before. **Full Changelog**: https://github.com/dathere/qsv/compare/28.0.0...29.0.0 ## [28.0.0] - 2026-11-01 🧠 The "DCAT-US v3.0 neuro-symbolic FAIRification" Release 🏛️ ### Highlights ~58 commits since 27.0.1, and the banner feature is **`profile` writing much more of a [DCAT-US v3.0](https://resources.data.gov/resources/dcat-us3/) record for you**, the metadata standard data.gov is moving to. qsv is a [neuro-symbolic](https://en.wikipedia.org/wiki/Neuro-symbolic_AI) [FAIRification](https://www.go-fair.org/fair-principles/fairification-process/) engine, and this release puts both halves to work on the same record: - **Symbolic: properties measured from the data.** `profile` computes what is tedious and error-prone to write by hand from the stats and frequency it already runs, plus a SQL pass over the file: `temporalResolution` as an exact duration, `accrualPeriodicity` only when the dates really are a regular series, a `spatial` bounding box that drops out-of-range and "null island" rows, the dataset's `language`, DQV quality measurements, and CSVW column constraints and a primary key. `--locate` names the places a dataset covers, from the offline GeoNames index or the US Census Geocoder, and a WKT `POINT` column (the shape Socrata exports) now counts as coordinates. - **Neural: metadata an LLM proposes, checked before it is used.** `--describegpt` or `--infer` adds a `describegpt` description, tags and data dictionary. Tags can be held to a controlled vocabulary, dictionary entries must name real columns, and a generated description says so in the description itself. Every value records where it came from: values the publisher supplies win over inferred ones, and values measured from the file win over everything discovered. A new `projection_provenance` block lists which tier each value came from, and `llm_attribution` keeps the LLM run's command line, API URL and timestamp out of the published record. See the [DCAT-US v3](https://github.com/dathere/qsv/wiki/DCAT-US-v3) and [Metadata Profiling](https://github.com/dathere/qsv/wiki/Metadata-Profiling) wiki pages. Also in this release: - **`describegpt`'s answer cache works as documented.** `--fresh`, `--forget` and multi-phase JSON/TOON runs all hit, replace or remove the entries they should, on disk and on Redis. - **Data Schematics size themselves when embedded.** A framed `viz smart` page reports its height to the host page, so CKAN can fit the iframe without injecting a script, and a map in a sandboxed iframe explains why it is blank. - **Benchmarks on hyperfine 2.0**, with peak memory recorded, suspect results quarantined, and new `geocode geoclient` benchmarks. - **Least-privilege CI.** Every workflow declares the `GITHUB_TOKEN` permissions it needs, and third-party actions are pinned to commit SHAs. Read **[Breaking Changes](#v28-breaking-changes)** before upgrading if you consume `profile`'s DCAT-US v3 output: two of its properties changed shape. ### 🙏 Contributors Thanks to everyone who made 28.0.0 possible: - [@jaemk](https://github.com/jaemk) for adding `RedbCache::scan_stats()` to [`cached`](https://github.com/jaemk/cached) 4.1 at our request ([jaemk/cached#336](https://github.com/jaemk/cached/issues/336), [jaemk/cached#337](https://github.com/jaemk/cached/pull/337)), which `geocode cache-info` now uses to count entries --- ### Breaking Changes - **`profile` (DCAT-US v3): CSVW column `datatype` is now an object, not a string** ([#4967](https://github.com/dathere/qsv/pull/4967)). It is now `{"base": "integer", "minimum": ..., ...}`, carrying derived constraints in the CSVW form, instead of a bare datatype string (`dcat-ap-v3` keeps the bare string). Consumers that read `datatype` as a string should read `datatype.base`. - **`profile` (DCAT-US v3): `theme` built from CKAN groups is now a list of Concepts, not group-name strings** ([#4972](https://github.com/dathere/qsv/pull/4972)). Each takes its `prefLabel` from the group's title and its `definition` from the group's description, and is placed `inScheme` the portal's own group list (`@id` `/group/`). The portal is found from a resource or input URL with CKAN's `/dataset/` path; without one, the scheme is titled "CKAN groups". Both titles can be changed in the profile (`concept_schemes`). ### Added - **`profile` (DCAT-US v3) computes properties that are tedious to write by hand**, deterministically, from the stats and frequency it already runs plus a SQL pass over the file. New MiniJinja helpers (`src/cmd/profile/derive.rs`) feed `resources/profiles/dcat-us-v3.yaml` (profile 5.0.0). Where a DataPusher+ spec supplies its own suggestions (`dpp_suggestions`), those still take precedence: ([#4967](https://github.com/dathere/qsv/pull/4967)) - `temporalResolution`, as an exact xsd:duration. A regular series reports its step (`PT15M`, `P1D`, and calendar steps such as `P1M` instead of a day count that varies from 28 to 31). Irregular data, such as event timestamps, reports the precision its values are recorded at (`P1D`, `PT1M`, `PT1S`). The smallest gap between two events is a sampling accident, not a resolution. - `accrualPeriodicity`: an ISO 19115 code (`daily`, `weekly`, `monthly`, ...) only when the dates form a regular calendar series, where 90% or more of the gaps are the same exact step. Event timestamps, such as 311 requests, describe no update schedule and get none. - `spatial`: the bounding box now excludes out-of-range coordinates and (0, 0) "null island" placeholder rows, noting how many it dropped. Distribution `spatialResolutionInMeters` is now the finest separation the coordinates' decimal precision can express. The DP+ helper it replaces as the default measures the bbox diagonal, which is the area's extent. - `language`: the ISO 639-1 language of the text values, using describegpt's chunk-agreement detector. Free-text columns are sampled from the file, and a sample made of a few repeated values is declined. - `hasQualityMeasurement` (DQV, the v3 replacement for `dataQuality`): percentage of non-empty cells and all-empty and partly-empty column counts. With `--validate`, duplicate rows and CSV structure / UTF-8 validity are added too. The duplicate-row count is one more pass over the file, so it never runs on the default path. Dimension IRIs come from the W3C `ldqd` vocabulary and are configurable in the profile. - With `--validate`, the Distribution's `characterEncoding` (`["UTF-8"]`), asserted only after `qsv validate` passes. No RFC 4180 `conformsTo` is claimed, because `qsv validate` is deliberately lenient (LF line endings, any delimiter). - Distribution `modified` from the server's `Last-Modified` header for URL inputs. - CSVW `csvw:tableSchema` columns carry constraints: `required`, numeric/date `minimum`/`maximum`, string `minLength`/`maxLength` for ASCII columns, an enumeration regex for small categorical columns, and a table `primaryKey` (a column whose distinct count equals the row count). - `profile`: an **inferred tier** for profile fields. A field's new `fallback:` template supplies a value only when nothing was supplied, forced or spec-derived. Discovered publisher metadata replaces an inferred value, while values measured from the file (byte size, checksum, bounding box, temporal coverage, CSVW schema, quality measurements) still win over discovery. qsv's estimates - `temporalResolution`, `spatialResolutionInMeters` and a Distribution `modified` read from `Last-Modified` - are inferred, so a publisher's stated values replace them. A new `projection_provenance` output block lists each inferred value as `inferred`, or `replaced` once discovery or an override superseded it. A field's `review_note:` adds a Recommended warning while the inferred value stands. ([#4967](https://github.com/dathere/qsv/pull/4967)) - `profile`: when no description is supplied, DCAT-US v3 gets a factual one generated from the statistics (row and column counts, time span, columns). It ends with a describegpt-style disclosure: "WARNING: Description generated automatically by qsv profile from summary statistics; not reviewed by a person. Verify before using!" A Recommended review warning keeps the missing human-authored description visible. When no identifier is supplied, the resource's URL (a URL input, or a seeded or CKAN `resource.url`) is used as an inferred `identifier`. ([#4967](https://github.com/dathere/qsv/pull/4967)) - **`profile --locate ` names the places a dataset covers** in its DCAT-US v3 `spatial` Locations. The densest coordinate cells (up to 40, after dropping out-of-range and (0, 0) rows) are looked up with `qsv geocode`, so its caches, rate limiting, retries and URL overrides apply. Results are weighted by how many rows each cell holds, so a few outlying points cannot outvote the core of the data. - `geonames` (offline index): the bounding-box Location is labelled with the finest level that 80% of the sampled rows share. That is the nearest place (with its `https://sws.geonames.org//` identifier), else the admin1 region, else the country. A dataset split between two places is labelled by what they have in common, never by one of them. - `census` (US Census Geocoder: keyless, cached): each state and each county holding at least 5% of the sampled rows (the heaviest state always; up to 10 counties) is added as a Location keyed by its Census GEOID. A state column (USPS code, FIPS code or name) supplies the states instead, in builds with `viz` - since #4973, whether or not the file has coordinates. - Every mode also adds the coordinates' centroid. A lookup that cannot run (offline, a Census outage) is noted in `projection_warnings` and the bounding box is kept. Without `--locate`, the output is unchanged. ([#4968](https://github.com/dathere/qsv/pull/4968)) - `profile --locate census`: **state and county Locations from region columns**. A county column (header mentioning "county"; county names such as `King`/`King County`, or 5-digit GEOIDs) now adds county Locations, alongside the state column's states. Each name is matched exactly against the Census county name table `viz` uses, within its own row's state when there is a state column, so `King, WA` is King County, Washington, and `Washington` resolves to a different county in PA and in MD. A name several counties share (`Baltimore` in Maryland, or `Washington County` with no state column) is left out and noted, never guessed. Without a state column, the states are those of the resolved counties. Counties holding at least 5% of the rows are listed (up to 10), and a column in which under half the values name a US county adds none. Region columns that resolve supply the Census Locations even when the file also has coordinates, since they name every row exactly where the coordinate lookup samples the 40 densest cells; the coordinates still give the bounding box, centroid and Geonames label. On data.gov's most-viewed dataset, Washington's Electric Vehicle Population Data, this adds King, Snohomish, Pierce and Clark counties. Builds with `viz` only. ([#4973](https://github.com/dathere/qsv/pull/4973)) - `profile` (DCAT-US v3): **a WKT `POINT (longitude latitude)` column supplies the coordinates** when a file has no latitude/longitude columns. This is the shape Socrata portals export a location column in, including data.gov's most-viewed dataset, Washington's Electric Vehicle Population Data, which until now got no spatial coverage at all. The `spatial` bounding box, Distribution `spatialResolutionInMeters` (from the points' decimal places), and `--locate` sampling and centroid all use it, and placeholder `(0, 0)` and out-of-range points are excluded as for latitude/longitude columns. A String column qualifies when its minimum and maximum values both start `POINT (` (any spacing, any case; `POINT Z`/`M`/`ZM` too, using their first two numbers), so place names such as "Point Reyes" don't, and no extra scan is needed to detect it. The detected column is listed in `dpp` as `POINT_FIELD`; `NO_LAT_LON_FIELDS` stays `true`, as DataPusher+'s own helpers expect. A POINT column none of whose values parse is noted. EWKT (`SRID=4326;POINT(…)`) and GeoJSON text are not detected. ([#4974](https://github.com/dathere/qsv/pull/4974)) The coordinate scan extracts each row's point once, in a subquery, so a POINT column costs no measurable time over a lat/lon pair (300k-row EV file, release build: 1.8 s before this, 0.46-0.56 s after, against 0.41-0.50 s without the column; [#4977](https://github.com/dathere/qsv/pull/4977)). - **`profile --describegpt ` / `--infer` add LLM-inferred metadata to the DCAT-US v3 projection, checked before it is used.** `--describegpt` reads a `qsv describegpt --format json` result. `--infer` runs `qsv describegpt --all` itself, using the `QSV_LLM_*` settings; when no LLM is reachable it warns and keeps the statistics-based description. Everything lands in the inferred tier, so supplied or discovered metadata still wins. ([#4969](https://github.com/dathere/qsv/pull/4969)) - The LLM Description replaces the statistics summary. describegpt's attribution footer (its command line, API URL and timestamp) is not published: it moves to a new `llm_attribution` output block. The description instead ends with a one-line disclosure naming the model ("WARNING: Description generated by an LLM (qsv describegpt, model …) and may contain inaccuracies. Verify before using!"). The review warning says the description came from an LLM. - Tags become `keyword`s, trimmed and de-duplicated. With `--tag-vocab `, only tags in the vocabulary are kept, since describegpt only *asks* the model to keep to it. The dropped tags are listed in an Info warning, and the kept ones also become `theme` Concepts carrying the vocabulary's description. - Dictionary labels and descriptions annotate the CSVW columns they name (`titles`, `dc:description`), with an Info note, and are listed in `projection_provenance` as inferred values (`replaced` once an override changes one; [#4981](https://github.com/dathere/qsv/pull/4981)). A dictionary naming none of the file's columns is reported and ignored. - Profile authors: `review_note:` is now a template. - `viz smart`: a Data Schematic embedded in an iframe now reports its own height to the embedding page (`postMessage({qsvVizHeight: }, "*")`), so a host such as CKAN can size the iframe to its content without injecting a script. It reports only when framed, on load, on resize (including the data viewer drawer opening and closing, so the iframe grows and shrinks), and when its content reflows. The data viewer now accepts the embedding page's `qsvVizViewport` answer only from that page. The gallery generator injects only its scroll-forwarding script into these pages. ([#4949](https://github.com/dathere/qsv/pull/4949)) - Gallery: the WPRDC 2-1-1 and Boston 311 Data Schematics can now be made **Live Data Schematics**. Each gallery entry has a "Make it a Live Data Schematic" how-to: download the page and the exact data it was rendered from, register it with qsv-clientd, and open it from disk, approving the pairing in a shell or from the qsv-clientd tray app's menu. The two data files too large to commit (`wpa_211_requests.csv`, `boston311-2025.tsv.gz`) are attached to the 27.0.1 release. The WPRDC figure is now rendered from the portal's own 13-column file instead of a reshaped 7-column extract, so Fetch latest returns data of the same shape; every number in its description is unchanged. ([#4952](https://github.com/dathere/qsv/pull/4952)) - **`scripts/benchmarks.sh` 10.1.0 benchmarks `geocode geoclient` against real NYC addresses** ([#4964](https://github.com/dathere/qsv/pull/4964)). The input is a committed 100,000-row sample of NYC Open Data's AddressPoint dataset, 20,000 distinct addresses per borough. - `geocode_geoclient_nocache` times live API calls on 10,000 of the rows. The public API's limits (2,500 requests/minute, 500,000/day) rule out all 100k uncached. - `geocode_geoclient_cache` times all 100,000 rows served from a primed result cache. The cache lives in its own directory, never expires, and is primed with the benchmark's exact request whenever the benchmark is selected, so a cold cache is never timed as a cached run. - Both run only when `QSV_GEOCLIENT_API_KEY` (or a self-hosted `QSV_GEOCLIENT_API_URL`) is set. Both are quarantined unless at least 90% of rows geocode; a live 1,000-row check geocoded 99.9%. - Opt-in: with `QSV_GEOCLIENT_API_URL` pointing at a self-hosted Geoclient (e.g. the `mlipper/geoclient` Docker image), `geocode_geoclient_nocache_selfhosted` replaces the uncached benchmark. It reads all 100,000 rows with qsv's rate limiter raised (`QSVBM_GEOCLIENT_RATE_LIMIT`, default 100,000/sec), so it times qsv's request pipeline instead of the public API's pacing. The images are amd64-only, so run it on x86_64 Linux; on Apple silicon they run emulated. - A run with `QSV_GEOCLIENT_API_URL` set is private: it still times, checks and prints everything, but `results/` is snapshotted before the run and restored when it exits (normally, on an error or on Ctrl-C), so timings from another machine never enter the published results. The run's own results are kept in git-ignored `results/private_latest_*` files. `QSVBM_RECORD_SELFHOSTED=1` records it like any other run. - The geoclient variables are documented in the script's header; `./benchmarks.sh help` says when the geoclient benchmarks will be skipped. A new "Benchmark Script Environment Variables" section of `docs/ENVIRONMENT_VARIABLES.md` lists the `QSVBM_*` settings users can change. ### Changed - `profile --validate`: the duplicate-row count (`hasQualityMeasurement`) keeps a 128-bit xxh3 hash per distinct row in one streaming pass, instead of `SELECT DISTINCT *` holding every full row. Release build, 1M-row 255 MB LA crime file: peak memory with `--validate` drops from 994 MB to 447 MB (the run without `--validate` peaks at 362 MB), for about 0.4 s more. A quoted empty field (`""`) now counts as the same value as an unquoted empty one, as CSV quoting does not change a value and qsv's completeness measure already counts both as empty; the SQL count treated them as different. ([#4975](https://github.com/dathere/qsv/pull/4975)) - `profile --validate` also runs `qsv validate` over the input (CSV structure + UTF-8), one extra pass over the file, so it can assert `characterEncoding` and record syntactic validity. Without `--validate` there is no extra pass, and neither is asserted. ([#4967](https://github.com/dathere/qsv/pull/4967)) - Build: bump `datasketches` from 0.5 to 0.6. `stats --quantile-method approx` now reads the quartiles, and separately the custom percentiles, in one t-digest scan each (`TDigestMut::quantiles`) instead of one query per rank, with identical output. 0.6's t-digest fixes can move an approximate quantile in its last printed digit: on 350K test rows, 2 of about 100 values changed, and parallel runs on indexed files were unchanged. `--cardinality-method approx` and `frequency --sketch-method frequent_items` output is unchanged. ([#4963](https://github.com/dathere/qsv/pull/4963)) - Build: bump `cached` from 4.0 to 4.1. `geocode cache-info` now counts each result cache's entries with `cached`'s new `RedbCache::scan_stats()`, added at our request ([jaemk/cached#336](https://github.com/jaemk/cached/issues/336)). Previously qsv opened the redb file a second time and decoded `cached`'s on-disk format itself. The scan uses the open cache handle and stays correct if `cached` changes its file format. qsv no longer depends on `redb` and `rmp-serde` directly. `cache-info` output is unchanged. ([#4983](https://github.com/dathere/qsv/pull/4983)) - Build: `viz` vendors DataTables 3.1.5 (from 3.1.4), with Buttons 4.1.3, ColumnControl 2.1.3 and DateTime 2.1.3 (SearchBuilder stays at 2.1.1), for the Data Schematic data viewer. None of the upstream patches is a security fix. The ones visible in qsv: Buttons positions the Advanced Filter popover correctly, and ColumnControl fixes a relative-position calculation. The seven vendored DataTables locales were re-fetched: upstream restructured the unused StateRestore strings, and German date-picker weekdays are now abbreviated (`So.`, not `Sonntag`). The gallery is regenerated. - Build: `viz_static` no longer depends on `webdriver-downloader` directly. qsv never called it; it is a build dependency of `plotly_static` (to fetch chromedriver at build time), and the patched fork still reaches it there. The `qsv` binary stops compiling 9 crates it didn't use (`webdriver-downloader`, `tar`, `which`, `home`, `xattr`, `lenient_semver*`, `tracing-attributes`). No behavior change. ([#4989](https://github.com/dathere/qsv/pull/4989)) - Code hygiene: fixes the warnings nightly clippy reports with `-W clippy::perf` (`then` -> `then_some`, `map_or_else` -> `map_or`, and reusing a cleared buffer instead of assigning a new `String`/`Vec`) in `color`, `fetch`, `fetchpost`, `moarstats`, `viz` and the help generator, ahead of those lints reaching stable clippy. No behavior change. ([#4990](https://github.com/dathere/qsv/pull/4990)) - **`scripts/benchmarks.sh` 10.0.0 runs on hyperfine 2.0, records peak memory, and quarantines suspect results** ([#4960](https://github.com/dathere/qsv/pull/4960)). - hyperfine 2.0 changed the exports the script reads, so with it installed every benchmark was flagged as failed and a run recorded nothing. hyperfine 2.0 is now required. - The archive gains a `peak_mem_mib` column, the largest peak RSS of a benchmark's timed runs, so memory regressions show up as well as slowdowns. - A result that looks like the command didn't do the work is kept out of the published results and quarantined in a local `suspect_results.csv` with the reason: - its timed runs differ by more than 3x; - its mean or peak memory falls far below that benchmark's most recent recorded version; - or an opt-in output check fails (`count` must print the row count; the `joinp` benchmarks must produce rows). - These are the failure modes that previously had to be found and pruned by hand. A quarantined result that is real, such as a genuine large speedup, is recorded with `./benchmarks.sh accept `. - Build: Polars is built with its `serde` feature instead of `serde-lazy`. qsv only serializes Polars schemas (the `.pschema.json` cache), which `serde` covers; `serde-lazy` also generated serialization code for Polars' whole query-plan layer, which qsv never uses. A clean `-F all_features` debug build takes about 16% less CPU time. No behavior change. ([#4951](https://github.com/dathere/qsv/pull/4951)) ### Fixed - `profile` / `describegpt` / `viz smart`: dataset-language detection needs words. Identifier-like values carry no language, but `n1 n2 … n20` (the file-order sample of an all-unique `name` column) was detected as Welsh: every chunk of the sample held the same lone letters, so the chunk-agreement gate passed. Each chunk must now hold at least 10 letters in runs of two or more; `n12` and `A7` contribute none, while text in scripts written without spaces (Japanese, Chinese) still counts. ([#4979](https://github.com/dathere/qsv/pull/4979)) - `describegpt`: dataset-language detection no longer counts a value more than once. A String column's top frequency values and its stats min and max were all added to the detection sample, so a column holding a single value (e.g. "Central Park") contributed it three times, and three identical chunks trivially passed the detector's chunk-agreement gate - "Central Park" was detected as Spanish, which then set `detected_language` and the language of the LLM prompts. Each distinct value now contributes once, as in `profile`. ([#4976](https://github.com/dathere/qsv/pull/4976)) - `describegpt --forget` completes a short `--model` name (e.g. `gpt-oss-20b`) from the LLM server's model list, as a run does, so it finds the answers that run cached under the full name (`openai/gpt-oss-20b`). It still needs no API key: when the server cannot be reached, the name is used as given, with a note. ([#4978](https://github.com/dathere/qsv/pull/4978)) - `describegpt`: the LLM-answer cache ([#4970](https://github.com/dathere/qsv/pull/4970)) - A dictionary answer that matched none of the columns (usually malformed JSON) was cached, so "Re-run to retry the inference" replayed the same unusable answer. It is now dropped from the cache, and a re-run asks the LLM again. - `--fresh` did not replace a cached answer, and on an empty cache it made a second LLM call and cached that answer instead of the one it returned. It now makes one call and writes that answer over the entry. - With `--format json` or `toon`, Description, Tags and Prompt never hit the cache in multi-phase runs (`--all`), because the dictionary they are keyed on carried a per-run timestamp. An identical re-run is now served entirely from the cache. - On Redis (`--redis-cache`), removing a cached entry (after a failed `--prompt` SQL query, or an unusable dictionary answer) never removed anything, because it deleted a raw key that does not match how entries are stored. - `--forget` never removed anything, on disk or Redis, though it reported "Found and removed". It built its keys before the input was hashed, and without the dictionary that Description, Tags and Prompt answers are keyed on. It now rebuilds each key the way the original run did, handles every selected phase, reports "Removed" only when an entry was there, and needs no API key. A `--prompt` answer is now served from the cache on an identical re-run. `--forget` with no phase flag still forgets every phase. ([#4971](https://github.com/dathere/qsv/pull/4971), [#4980](https://github.com/dathere/qsv/pull/4980)) - `profile` (DCAT-US v3): a dataset whose dates are all timestamps (DateTime columns, such as 311 `open_dt`/`closed_dt`) got no `temporal` coverage at all, because only Date columns were read. `temporal` is one of the migration fields the DCAT-US v3 guidance flags as most likely to fail validation. ([#4967](https://github.com/dathere/qsv/pull/4967)) - `profile` (DCAT-US v3 profile): CSVW `csvw:tableSchema` columns were listed alphabetically instead of in file order (CSVW requires the schema's column order to match the table's). The SQL backend for profile helpers now resolves the delimiter as stats does, so a `.tsv` input is no longer read as one comma-separated column. ([#4967](https://github.com/dathere/qsv/pull/4967)) - `viz map`/`viz geo`: a non-numeric `--color` or `--size` column now gets an error that names it. Both options are numeric encodings, so a categorical column (e.g. `--color Borough`) dropped every row, and the error blamed `--lat`/`--lon` even though the coordinates were valid. The message now names the column and points to `--series` for categorical coloring; in `--density` mode, which rejects `--series`, it explains that the column is the numeric heatmap weight. ([#4959](https://github.com/dathere/qsv/pull/4959)) - `viz smart`: clicking a region on a county-name map now keeps the rows whose state is blank. When county names are qualified by a state column, the data viewer filter required one of the state spellings seen for that county, so a row the map had placed without a state (its county name unique on its own) was counted on the map but dropped from the drill-down; a county whose rows all lacked a state showed no rows at all. Blank states now match through the filter's "Empty" condition. Found on the WPRDC 2-1-1 gallery page (#4952). ([#4953](https://github.com/dathere/qsv/pull/4953)) - **`viz smart`: a map in a sandboxed iframe now says why it's blank** ([#4947](https://github.com/dathere/qsv/pull/4947), [#4946](https://github.com/dathere/qsv/issues/4946)). Embedded in an `