While trying to join two tables ('A' and 'B') on a numeric field, and where each table has the exact same range of values, I get the following error:
Error: Fields X and Y have unequal types TYPE_INT64 and TYPE_INT32, so they can't be join attributes.
It's not possible to join on INTEGER(A.X) = B.Y because only field names are accepted, not arbitrary expressions. Casting A.X in a subquery works, but the performance is very poor since it is the larger table; casting B.Y does not work, which seems inconsistent with the error message (implying Y is 32-bit) and the documentation for the INTEGER function (converts to 64-bit). Could this be a bug?