Inserting {id: uuid(), v: BigInt(123), date: new Date()} into this simple table:
with encoding.useBigIntAsLong: true results in this error:
The reason is that _encodeBigIntFromBigInt is more restrictive than _encodeBigIntFromLong - it doesn't allow plain JS numbers, see https://github.com/datastax/nodejs-driver/blob/v4.3.1/lib/encoder.js#L511-L549 .
PR:
Merged PR and included test.