1

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?

4

1 に答える 1

1

最善の策は、サブクエリでのキャストです。結合パフォーマンスの本当の問題は、キャストではなく、結合アルゴリズムの非効率性です。これは現在対処中ですが、より大きなクエリ実行エンジンの変更の一部であるため、時間がかかります。

于 2012-07-31T16:14:21.510 に答える