Fix for long predicate comparisons with large numbers

Fixes an issue where we were downcasting to int when constructing our query.

@tgoyne 
I might be wrong here - tests are failing because the variable in our test object is long, which is different for different devices.