Pretty self-explanatory.
rethinkdb(958,0x700009ebf000) malloc: *** mach_vm_map(size=240000000000000) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug rethinkdb: Memory allocation failed. This usually means that we have run out of RAM. Aborting.
Desired behavior is to behave like r([]).sample(1e12) and smaller values which on my machine produce [].