-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add BooleanWritableConverter to use them in SequenceFileLoader in pig #404
base: master
Are you sure you want to change the base?
Conversation
|
||
@Override | ||
protected Long toLong(BooleanWritable writable) throws IOException { | ||
return (long)( writable.get() ? 1:0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny nitpick:
maybe just: return writable.get() ? 1L : 0L;
�Would you please merge this to the code base? Or anything I else I could help? |
case DataType.LONG: | ||
case DataType.FLOAT: | ||
case DataType.DOUBLE: | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not support string "true"
and "false"
conversion?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see chararray up top, though looks like it's stringifying the integer zero / one?
LGTM. @sagemintblue can we merge? |
|
I have used BooleanWritable as a key or value in SequenceFile, since BooleanWritable is built inside hadoop, I suggest to have BooleanWritableConverter built into the elephant-bird.