Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xuwenhao
Copy link

@xuwenhao xuwenhao commented Jul 2, 2014

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.


@Override
protected Long toLong(BooleanWritable writable) throws IOException {
return (long)( writable.get() ? 1:0);
Copy link
Contributor

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;

@xuwenhao
Copy link
Author

�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;
Copy link
Contributor

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?

Copy link
Contributor

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?

@rangadi
Copy link
Contributor

rangadi commented May 15, 2015

LGTM. @sagemintblue can we merge?

@CLAassistant
Copy link

CLAassistant commented Jul 18, 2019

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

5 participants