Skip to content

[C++][Compute] Support tagging ExecBatches with arbitrary extra information #18681

@asfimport

Description

@asfimport

Ideally, ExecBatches could be tagged with arbitrary optional objects for tracing purposes and to transmit execution hints from one ExecNode to another.

These should not be explicit members like ExecBatch::selection_vector is, since they may not originate from the arrow library. For an example within the arrow project: libarrow_dataset will be used to produce ScanNodes and a WriteNodes and it's useful to tag scanned batches with their Fragment of origin. However adding ExecBatch::fragment would result in a cyclic dependency.

To facilitate this tagging capability, we would need a type erased container something like

struct AnySet {
  void* Get(tag_t tag);
  void Set(tag_t tag, void* value, FnOnce<void(void*)> destructor);
};

Reporter: Ben Kietzman / @bkietz

Related issues:

Note: This issue was originally created as ARROW-12873. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions