trxcllnt commented on issue #43193: URL: https://github.com/apache/arrow/issues/43193#issuecomment-2256587850
Dates are relatively [expensive to create](https://github.com/apache/arrow/pull/40892#issuecomment-2030786983) in node, so the decision was made in #40892 to always return the numeric representation, and allow users to construct Dates/handle timezones themselves, i.e. `new Date(ts.get(0))`. This strikes a balance between API consistency and performance, as without it, users who didn't wish to incur the cost of constructing `Date` instances would need to manually enumerate the raw buffers in each underlying `data` instance: ```ts ts.data.forEach(chunk => chunk.values.forEach(num => /* compute w/ timestamp */)) ``` > while there's no reason why Arrow would be required to map Date objects to something which maps back to Date objects The Vector creation convenience functions still accept Arrays of Date instances because they infer the dtype if none is explicitly passed. -- 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]
