Michael Entin
1 min readDec 17, 2019

--

I would do one modification — rather than MOD(ABS(FARM_FINGERPRINT(field)),4000), do ABS(MOD(FARM_FINGERPRINT(field),4000)). The only change is I’ve moved ABS out, the reason is that if FARM_FINGERPRINT result happens to be exactly minimum int64 value, abs fails because there is no corresponding positive value: int64 overflow: --9223372036854775808. But abs(mod( works.

--

--

Michael Entin
Michael Entin

Written by Michael Entin

Hi, I'm TL of BigQuery Geospatial project. Posting small recipes and various notes for BQ Geospatial users.

Responses (1)