Benjamin-Philip commented on PR #114:
URL: https://github.com/apache/arrow-erlang/pull/114#issuecomment-5159297096
> ## Pull request overview
>
> Copilot reviewed 5 out of 5 changed files in this pull request and
generated no new comments.
> Suppressed comments (1)
>
> **src/arrow_buffer.erl:123**
>
> * `size/1` doesn’t validate its input (unlike `to_arrow/1` and
`to_erlang/1`). Passing a non-#buffer{} will currently raise a low-level
`badrecord` error instead of the module’s consistent `badarg` contract.
>
>
> ```
> size(Buffer) ->
> Len = Buffer#buffer.length,
> Len + arrow_utils:pad_len(Len).
> ```
This is fine. `size/1` is an internal function that is not meant to be user
facing. I don't want to waste CPU cycles on validations. Dialyzer will raise if
inputs don't match the typespecs which is good enough here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]