Skip to content

Conversation

@westonpace
Copy link
Member

Adds an enumerating generator which tags items with their index as well as whether or not they were the last item in the sequence. This is needed for reassembly potentially out of order record batches during scan.

…r index as well as whether or not they were the last item in the sequence. This is needed for reassembly potentially out of order record batches during scan.
@github-actions
Copy link

github-actions bot commented Apr 8, 2021

@lidavidm lidavidm changed the title ARROW-12287: [C++] Create enumerating future ARROW-12287: [C++] Create enumerating generator Apr 8, 2021
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one typo in the docstring.


/// Wraps items from a source generator with positional information
///
/// When reqsequencing items from multiple streams that have been merged into
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"resequencing"

///
/// Note: Another potential use for this could be resequencing items from a
/// jittery source. However, the readahead generator will not emit items out of
/// order today so this is not needed. Furthermore, this generator would need to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is very insightful. Also, the readahead generator isn't the only way of producing items out of order.

/// order today so this is not needed. Furthermore, this generator would need to
/// support async reentrancy which, while possible, is not done currently.
///
/// Note: Since this generator is not actually taking in out-of-order sources it isn't
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why "not actually"? This reads confusing. Are you discussing this implementation or whatever use is made of it inside the code base?

/// Note: Since this generator is not actually taking in out-of-order sources it isn't
/// strictly neccesary to add the index, it could be added by a map generator. However,
/// since this generator is usually used as later input to the sequencing generator and
/// the sequencing generator needs the index we go ahead and add it for utility's sake
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, I think sentences like this are confusing. Adding something "for utility's sake" while claiming it's not useful does not make sense.

@westonpace
Copy link
Member Author

@pitrou I cleaned up the description so it doesn't ramble so much. The "it would be nice if" speculation I put in ARROW-12371.

@westonpace
Copy link
Member Author

R failure unrelated, ready for merge/additional review.

@lidavidm lidavidm closed this in 9c85e54 Apr 14, 2021
@westonpace westonpace deleted the feature/arrow-12287 branch January 6, 2022 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants