Skip to content

Fix json_strings recipe: refresh output captured on Spice v1.x - #561

Open
claudespice wants to merge 1 commit into
spiceai:trunkfrom
claudespice:claude/fix-json-strings-v2-output
Open

Fix json_strings recipe: refresh output captured on Spice v1.x#561
claudespice wants to merge 1 commit into
spiceai:trunkfrom
claudespice:claude/fix-json-strings-v2-output

Conversation

@claudespice

Copy link
Copy Markdown
Contributor

Summary

Every console block in this recipe was captured on a v1.x runtime in December 2024. I re-ran the recipe end to end against stable v2.1.2 and replaced the blocks with what it actually prints today. Values and row counts are unchanged — only the output shape drifted.

  • SQL results carry a data-type row. Since v2.0.0 the SQL REPL formats results with format_batches_with_types, which prints the column types under the names and centers the header. The recipe showed the older untyped, left-aligned header.
  • describe returns four columns. It gained a leading table_schema; the recipe showed three.
  • The -> derived column name changed. properties->'inventory' now projects as properties -> 'inventory', not products.properties -> Utf8("inventory").
  • The startup log is stale. It advertised a metrics listener on 127.0.0.1:9090 and an OpenTelemetry listener on 127.0.0.1:50052 — neither is emitted by a default v2.1.2 run — and Initialized results cache; is now three separate sql/search/embeddings cache lines.

Verified against

spiceai/spiceai at v2.1.2crates/repl/src/pretty.rs (format_batches_with_types, unconditional in non-expanded mode) and crates/repl/src/lib.rs.

Evidence

Ran it. Official v2.1.2 release binaries, this recipe's own spicepod.yaml, this recipe's own queries in README order:

$ spice sql
sql> describe products;
+--------------+-------------+-----------+-------------+
| table_schema | column_name | data_type | is_nullable |
|    varchar   |   varchar   |  varchar  |   varchar   |
+--------------+-------------+-----------+-------------+
| public       | id          | Int64     | YES         |
| public       | name        | Utf8      | YES         |
| public       | properties  | Utf8      | YES         |
+--------------+-------------+-----------+-------------+

Time: 0.00167675 seconds. 3 rows.

Every table in the diff is pasted from that session (the per-query Time: lines are dropped, matching the recipe's existing style).

Note for maintainers

The missing type row is not specific to this recipe — 74 of the cookbook's READMEs show the pre-v2.0 untyped header. Two recipes captured on v2.x (catalogs/unity_catalog, elasticsearch/connector) already show the typed form, so the repo is currently inconsistent. This PR fixes one recipe that runs locally with no Docker or secrets; the rest need a run each to regenerate honestly. Happy to work through them if that is wanted — or to hold off, if the type row is considered noise that should change on the CLI side instead.

Every console block in this recipe was captured on a 2024 v1.x runtime.
Re-ran the recipe end to end against stable v2.1.2 and replaced the
output with what it actually prints:

- SQL results now carry a data-type row under the column names, and
  column names are centered (`format_batches_with_types`, used by the
  SQL REPL since v2.0.0).
- `describe` returns four columns; it gained a leading `table_schema`.
- The derived column for `properties->'inventory'` is now
  `properties -> 'inventory'`, not `products.properties -> Utf8("inventory")`.
- The startup log no longer reports a metrics listener on 9090 or an
  OpenTelemetry listener on 50052, and the results-cache line is now
  three separate sql/search/embeddings cache lines.

Values and row counts are unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant