Skip to content

Helper method for RecordBuilder to drop last, incomplete "rows" #796

@oakad

Description

@oakad

Describe the enhancement requested

When populating RecordBuilder batches from row based data, we frequently end up in a situation, whereupon some sort of error prevents processing on an entire incoming data row. This will result in some field values (first few) being added to field arrays, whereupon some remaining field arrays will remain shorter, as incoming row processing was aborted.

Of course, NewRecordBatch method has a check to prevent such record batches from actually going somewhere.

But what will be really useful, is to have a method which will truncate the extant field arrays within RecordBuilder to the length of the shortest one amongst them, effectively discarding the incomplete rows.

This simple method will simplify non-critical error processing substantially, without forcing users to build their own, potentially buggy methods doing the same with individual Builder.Resize methods.

Component(s)

Other

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions