You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the codebase, we have two methods: to_arrow and as_arrow. These can be potentially confusing due to uncertainty regarding when to use each one. It would be useful to add documentation or perhaps even unify the methods or create a new method that returns a Cow.
The reason for this is that to_arrow performs an allocation, whereas as_arrow returns a reference. Sometimes, you don't actually need to do the allocation. If you return a Cow, it can either avoid allocation by returning Cow::Borrowed, or perform an allocation when necessary and return Cow::Owned.
The text was updated successfully, but these errors were encountered:
In the codebase, we have two methods:
to_arrow
andas_arrow
. These can be potentially confusing due to uncertainty regarding when to use each one. It would be useful to add documentation or perhaps even unify the methods or create a new method that returns aCow
.The reason for this is that
to_arrow
performs an allocation, whereasas_arrow
returns a reference. Sometimes, you don't actually need to do the allocation. If you return aCow
, it can either avoid allocation by returningCow::Borrowed
, or perform an allocation when necessary and returnCow::Owned
.The text was updated successfully, but these errors were encountered: