ENG-5926 Add explicit sql casts to force type compatibility of inserted ...

...tuples. (community tests pass, pro tests are pending)