The sql call below returns an empty array to the rows variable. I'm not sure how the query is being translated exactly (is there a way to see the generated query?) but I think throwing would be more useful than gracefully returning an empty array.
const arr = []
const rows = await sql`select *
from generate_series(1, 5) i
where i not in ${sql(arr)};`
await sql.end()
console.log(rows)```