Skip to content

Type Inference

See also: Data Transfer / Primitive Management for how Adhoc handles primitive types at runtime.

Ints and Longs

ints are generally treated as longs.

  • Aggregations (e.g. SUM) will automatically turns int into long
  • EqualsMatcher, InMatcher and ComparingMatcher will automatically turns int into long

Floats and Doubles

floats are generally treated as doubles.

  • SUM will automatically turns float into double
  • EqualsMatcher, InMatcher and ComparingMatcher will automatically turns float into double

Numbers

  • Aggregations should generally aggregates as long, else double.