Wrap sqlalchemy sum to handle BigInteger.