pitrou commented on code in PR #40960:
URL: https://github.com/apache/arrow/pull/40960#discussion_r1551349104


##########
js/test/unit/builders/utils.ts:
##########
@@ -32,22 +32,14 @@ const randnulls = <T, TNull = null>(values: T[], n: TNull = 
<any>null) => values
 export const randomBytes = (length: number) => fillRandom(Uint8Array, length);
 
 export const stringsNoNulls = (length = 20) => Array.from({ length }, (_) => 
randomString(1 + (Math.trunc(Math.random() * 19))));
-export const timestamp32sNoNulls = (length = 20, now = Math.trunc(Date.now() / 
86400000)) =>
+export const timestampNoNulls = (length = 20, now = Math.trunc(Date.now() / 
86400000)) =>
     Array.from({ length }, (_) => (Math.trunc(now + (rand() * 10000 * (rand() 
> 0.5 ? -1 : 1)))) * 86400000);

Review Comment:
   Given the scale of `rand() * 10000` compared to `now`, this will never 
produce timestamps with a negative value, right?



-- 
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]

Reply via email to