You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "FrNecas (via GitHub)" <gi...@apache.org> on 2023/08/24 08:15:54 UTC

[GitHub] [arrow] FrNecas commented on pull request #37341: GH-21815: [JS] Add support for Duration type

FrNecas commented on PR #37341:
URL: https://github.com/apache/arrow/pull/37341#issuecomment-1691222555

   @trxcllnt thanks for the very quick review! Hm, these `set*` functions are used in the sub-builders: https://github.com/apache/arrow/blob/c89b3e18deddea194dcff8cc3b2e6a9174768141/js/src/builder/duration.ts#L31 
   
   And if we shortened this like you proposed, the typing would get wider, wouldn't it? Because then `DurationSecond._setValue` would accept all these `Duration*` types (feel free to correct me on this, I am not a JS/TS expert). For this reason, I think at least for `set*`, we should keep it this way. The `get*` methods aren't used in such a way so we could simplify it there but maybe it's better to keep it for consistency reasons (consistency with the other types, e.g. `Interval` and also consistency with the `set*` methods so that it's symmetrical). 
   
   What do you think about this?


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org