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 performance regression when hive SerDe doesn't prefer Writables #5142

Merged
merged 1 commit into from
Sep 11, 2020

Conversation

pettyjamesm
Copy link
Member

Cross contribution of prestodb/presto#15163

Introduced in prestodb/presto#8206 GenericHiveRecordCursor was modified to avoid extra overhead when the SerDe provided a more efficient String handling implementation with Writables. However, when the SerDe does not provide such an implementation and instead already returned String instances directly, this change introduced an extra conversion from bytes to String just to be converted back to bytes.

This change alters the behavior of GenericHiveRecordCursor#parseString to respect the PrimitiveObjectInspector's preference for using writables.

Introduced in prestodb#8206, GenericHiveRecordCursor was modified to
avoid extra overhead when the SerDe provided a more efficient String
handling implementation with Writables. However, when the SerDe does
not provide such an implementation and instead already returned String
instances directly, this change introduced an extra conversion from
bytes to String just to be converted back to bytes.

This change alters the behavior of GenericHiveRecordCursor parseString
to respect the PrimitiveObjectInspector's preference for using writables.
@cla-bot cla-bot bot added the cla-signed label Sep 11, 2020
@pettyjamesm pettyjamesm requested a review from dain September 11, 2020 15:53
@electrum electrum merged commit 10f8a36 into trinodb:master Sep 11, 2020
@electrum
Copy link
Member

Thanks!

@pettyjamesm pettyjamesm deleted the hive-recordcursor-writable-fix branch September 11, 2020 19:22
@electrum electrum mentioned this pull request Sep 23, 2020
9 tasks
@electrum electrum added this to the 342 milestone Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants