Skip to content

Conversation

@kszucs
Copy link
Member

@kszucs kszucs commented Dec 10, 2020

@bkietz @romainfrancois something like this would be suitable?

On the R side it would be enough to implement the Extend method for each converter.

}

virtual Status Append(InputType value) = 0;
virtual Status Append(InputType value) { return Status::NotImplemented("Append"); }
Copy link
Member Author

Choose a reason for hiding this comment

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

@bkietz I think we should keep both Append and Extend since we wrap the converter object with the Chunker, so if one implementation (like the python one) choose to use Append then we don't need to subclass the chunker class.

@github-actions
Copy link

Thanks for opening a pull request!

Could you open an issue for this pull request on JIRA?
https://issues.apache.org/jira/browse/ARROW

Then could you also rename pull request title in the following format?

ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}

See also:


// we could get bit smarter here since the whole batch of appendable values
// will be rejected if a capacity error is raised
Status Extend(InputType values, int64_t size) {
Copy link
Member Author

Choose a reason for hiding this comment

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

The chunker's extend wrapper is untested since we use Append from the python code. Theoretically we can wrap the converter's Extend method just like in the case of Append though we reject the whole batch rather than a single item.

We could improve this logic but would require details about the iteration.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think adding a int64_t start in addition to size as in #8650 would help. but I haven't yet reviewed how the chunker code works, e.g. can it "know" that it can handle n extra values in the current chunk ?

@nealrichardson
Copy link
Member

This has been pulled into #8650

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