Skip to content

Missing data types in specification? #495

Not planned
Not planned

Description

@RickBullotta

There are explicit array data types for many of the primitive types, but not for Text and some of the other metric types.

Activity

  1. SeppPenner commented on Dec 7, 2023

    @SeppPenner

    True, there is also no useful way to add a value as int or long instead of uint or ulong, I guess.

  2. SeppPenner commented on Dec 7, 2023

    @SeppPenner

    Related issue: #499.

  3. wes-johnson commented on Nov 24, 2026

    @wes-johnson
    Contributor

    Won't do — the array types are not being added. The asymmetry is being resolved from the other side instead: Text is removed in #660.

    Taking the two halves of this issue separately.

    The signed integer point (@SeppPenner's first comment, and the related #499) was addressed by #62 in March 2025, which added Int8, Int16, Int32 and Int64 alongside the unsigned types. That part is done.

    The missing array types. Going through the enum, exactly one Basic Type lacked an array counterpart: Text. Rather than add TextArray, we are removing Text.

    Text was never distinguishable from String. Both were defined as "String value (UTF-8)", both map to Protocol Buffers string, both ride in the same string_values array, and nothing in the specification ever said what made one different from the other. Inductive Automation's tag data types, which Sparkplug's are modelled on, deprecated Text in Ignition 8.1.8 and document no difference between the two either — and Ignition likewise has a String Array and no Text array, so the asymmetry you spotted here mirrors one upstream.

    Adding TextArray would therefore have created a second array type whose elements are indistinguishable from StringArray's, duplicating the ambiguity rather than closing it. Sparkplug 4 is unreleased, so the type can go now at no cost.

    The use Text was informally put to — large JSON, XML, long logs — is tracked as #444, which proposes a type for generic JSON. That is the defined successor.

    The remaining gaps this issue touched, for the record:

    • UUID has no array type. Cheap to add if wanted, since it maps to string_values like String does, and unlike Text it has a defined meaning.
    • Bytes and File have no array types. Those would need a new repeated bytes field in ValueArray — real cost, and arguably Bytes already covers the case.
    • Arrays of templates are Add support for arrays of Templates #450.
    • DataSet is already two-dimensional, so an array of them is unlikely to be wanted.

    If any of those are worth pursuing, a focused issue each would be easier to act on than this one. Thank you for the report — it turned out to point at something larger than a missing enum value.

  4. added 4 commits that reference this issue on Nov 25, 2026
  5. wes-johnson commented on Nov 25, 2026

    @wes-johnson
    Contributor

    Resolved by #660, merged as e816288 — Text is removed rather than TextArray added, for the reasons in the comment above.

    The DataType enum now runs 0–34 with no gaps: UUID is 14, DataSet 15, Bytes 16, File 17, Template 18, PropertySet 19, PropertySetList 20, the array types 21–33 and Command 34. Sparkplug 4 is unreleased, so closing the gap costs nothing; it was raised in review and kept deliberately.

    Closing as won't do with respect to the original request, since the missing array types are not being added. The remaining gaps noted above — UUID, Bytes/File, and arrays of templates (#450) — are unaffected and would each be easier to act on as a focused issue.

  6. added
    wontfix
    on Nov 25, 2026
  7. SeppPenner commented on Nov 30, 2026

    @SeppPenner

    @wes-johnson Thank you for the new information here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions