avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Meyer, Dennis" <dennis.me...@adtech.com>
Subject BigInt / longlong
Date Wed, 28 Mar 2012 18:01:40 GMT

What type refers to an Java Bigint or C long long? Or is there any other type in Avro that
maps a 64 bit unsigned int?

I unfortunately could only find smaller types in the docs:
Primitive Types

The set of primitive type names is:

  *   string: unicode character sequence
  *   bytes: sequence of 8-bit bytes
  *   int: 32-bit signed integer
  *   long: 64-bit signed integer
  *   float: single precision (32-bit) IEEE 754 floating-point number
  *   double: double precision (64-bit) IEEE 754 floating-point number
  *   boolean: a binary value
  *   null: no value

Anyway in the encoding section theres some 64bit unsigned. Can I use them somehow by a type?
Work around might be to use the 52 significant bits of a double, but seems like a hack and
of course loosing some more number space compared to uint64. I'd like to get around any other
self-encoding hacks as I'd like to also use Hadoop/PIG/HIVE on top on AVRO, so would like
to keep functionality on numbers if possible.


View raw message