Support date partitioning with JSON data.

Commit message says it all.

I also updated the Thrift code to support fields other than `timestamp`.

CC @pgarbacki @andykram
Rather than re-throwing, add the relevant exception type to the method signature so that the caller can do properly filtering based on the exception type.