Skip to content

Conversation

@koboldunderlord
Copy link

Attempt #2.

Hive handles primitive types using the base Hadoop writable rather than
its own during joins, which means that in order to use the proper
DoubleWritable class from Hive you have to actually return an object of
the appropriate type in JsonSerDe.serializeField instead of a primitive.

Hive handles primitive types using the base Hadoop writable rather than
its own during joins, which means that in order to use the proper
DoubleWritable class from Hive you have to actually return an object of
the appropriate type in JsonSerDe.serializeField instead of a primitive.
@koboldunderlord koboldunderlord changed the base branch from master to develop August 30, 2016 23:54
case BYTE:
result = ((ByteObjectInspector)poi).get(obj);
result = Byte.valueOf(((ByteObjectInspector)poi).get(obj));
break;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since result is an object, not a primitive, Java autoboxing takes care of that automatically.
See http://docs.oracle.com/javase/tutorial/java/data/autoboxing.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants