facebook/presto — pull request #1983 by viirya (2014-11-18 06:36:24+00:00)
Title: Fix ArrayIndexOutOfBoundsException when parsing Hive timestamp column

When parsing hive timestamp column, `TimestampWritable.getNanos` would cause problem (such as `ArrayIndexOutOfBoundsException`) if the nanos field is not available in byte array. `TimestampWritable` has detection logic to prevent this problem. So this PR uses `TimestampWritable` to parse the bytes of hive timestamp data. Since `TimestampWritable.set()` directly uses given byte data without copying it, the modifying should not add too much cost.