Skip to content

[XLANG] add union to xlang type system #3027

@chaokunyang

Description

@chaokunyang

Feature Request

add union to xlang type system

Is your feature request related to a problem? Please describe

No response

Describe the solution you'd like

union is used wildly in many languages:

  • rust: tagged enum
  • c++: variant

And other systems all has union:

  • protobuf has oneof
  • FlatBuffers has union
  • Arrow has sparse/dense union array

We can add a UNION type too. the protocol can be:

ref meta | UNION type id | union index  | value |

Tracking issue:

Describe alternatives you've considered

No response

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions