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

Fix type of values in sql update. #1295

Merged
merged 1 commit into from
Apr 18, 2015
Merged

Fix type of values in sql update. #1295

merged 1 commit into from
Apr 18, 2015

Conversation

anubhgup
Copy link
Contributor

While running hadoop indexer with postgres, postgres update fails due to type mismatch between the update and the segments table. This CL fixes it.

.put("version", segment.getVersion())
.put("used", true)
.put("payload", mapper.writeValueAsString(segment))
.put("payload", mapper.writeValueAsString(segment).getBytes())
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't do that because you didn't specify character encoding.

Can you writeValueAsBytes instead?

@anubhgup
Copy link
Contributor Author

Switched to writeValueAsBytes.

@xvrl
Copy link
Member

xvrl commented Apr 18, 2015

@anubhgup thank you for the fix, do you mind signing our CLA and squashing your commits, so we can merge this?

@anubhgup
Copy link
Contributor Author

Done.

fjy added a commit that referenced this pull request Apr 18, 2015
Fix type of values in sql update.
@fjy fjy merged commit 1addbe1 into apache:master Apr 18, 2015
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.

None yet

4 participants