You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Decode MessagePack, igbinary, Protobuf and Avro values with Display As #3607
Display As has seven formats: Raw Value, Text, UUID, two Unix timestamps, JSON and PHP Serialized (features/json-viewer.mdx:14-22, apple/TablePro/Core/Services/Formatting/ValueDisplayFormat.swift:12-19). A binary column that holds a compact serialization shows only hex:
MessagePack, common for cache payloads and job queues.
igbinary, the binary form of PHP serialization, which the PHP Serialized viewer does not read.
Protobuf and Avro. On Kafka, a topic whose values are Avro or Protobuf shows the raw bytes, five-byte wire-format prefix included (databases/kafka.mdx:151-152).
The UUID format also renders the bytes in stored order (apple/TablePro/Core/Services/Formatting/ValueDisplayFormatter.swift:56-74). A MySQL column filled with UUID_TO_BIN(uuid, 1), which moves the time fields to the front, renders as a UUID that differs from the one the application wrote.
Proposed solution
MessagePack on binary columns: decoded into the JSON tree viewer, read-only, with badges for bin, ext and timestamp values.
igbinary on binary columns: decoded into the PHP serialized viewer's tree.
Protobuf on binary columns: with no schema, the wire format as field numbers and wire types. With a .proto file or descriptor set chosen for the column, field names and types.
Avro on binary columns: decoded with a writer schema file chosen for the column.
On Kafka, a value with the wire-format prefix reads its schema ID, and when the connection names a Schema Registry URL, the Avro or Protobuf schema is fetched from it.
UUID (Swapped Time) for UUID_TO_BIN(uuid, 1) columns, and an edit typed as a UUID is written back in the same byte order.
Each format behaves like the existing ones: set per column and scoped to the connection and table, rendering only, a single copied cell copies the decoded text, and filters and highlight rules still read the stored value (features/filtering.mdx:32).
A value that does not decode falls back to hex, and the viewer says why.
Done when: each format decodes a fixture written by its reference library, a broken value falls back to hex, and a UUID_TO_BIN(uuid, 1) value renders as the UUID passed in.
Alternatives considered
Copy the hex out and decode it with a script, or write a view that decodes on the server where the engine can.
I'm picking up the rest of this for the macOS app, on top of #3761. Plan:
igbinary on binary columns. Decoded into the PHP serialized viewer's tree. The text form (cell, Text view, copy) is the matching serialize() string.
Avro on binary columns. "Display As > Avro Schema…" asks for a .avsc file. The schema is saved with the column's format, per connection and table. Logical types (decimal, uuid, date, time, timestamp) render as readable values. A value with the Kafka wire-format prefix decodes too, and the viewer names the schema ID.
Picking up the last two parts for the macOS app, on top of #3962 (it needs that PR's Avro decoder and schema file storage).
Protobuf with a schema. "Display As > Protobuf Schema…" takes a .proto file or a descriptor set from protoc --descriptor_set_out, then the message type when the file has more than one. Values show field names and declared types. The text form matches protoc --decode. Fields the schema does not name show by number, as without a schema.
Schema Registry. The Kafka connection gets a Schema Registry URL, with an optional user name and password. "Display As > Schema Registry" reads the schema ID from each value's wire-format prefix, fetches the Avro or Protobuf schema (with its references), caches it for the session, and redraws the cells once it arrives.
Same rules as the other formats: rendering only, copy gives the decoded text, filters read the stored value, and a value that does not decode, or whose schema cannot be fetched, falls back to hex with the reason.
Tests decode fixtures written by protoc and by Confluent's serializers against a real Schema Registry, plus broken values.
Activity
J2TeamNNL commentedon Oct 31, 2026
I'm picking up the rest of this for the macOS app, on top of #3761. Plan:
serialize()string..avscfile. The schema is saved with the column's format, per connection and table. Logical types (decimal, uuid, date, time, timestamp) render as readable values. A value with the Kafka wire-format prefix decodes too, and the viewer names the schema ID.Protobuf with a
.protoor descriptor set, and fetching schemas from a Schema Registry, are left for a follow-up PR.J2TeamNNL commentedon Nov 1, 2026
Picking up the last two parts for the macOS app, on top of #3962 (it needs that PR's Avro decoder and schema file storage).
.protofile or a descriptor set fromprotoc --descriptor_set_out, then the message type when the file has more than one. Values show field names and declared types. The text form matchesprotoc --decode. Fields the schema does not name show by number, as without a schema.protocand by Confluent's serializers against a real Schema Registry, plus broken values.