Skip to content

Serialize filters#657

Merged
qiaojialin merged 7 commits intomasterfrom
serialize_filters
Dec 24, 2019
Merged

Serialize filters#657
qiaojialin merged 7 commits intomasterfrom
serialize_filters

Conversation

@jt2594838
Copy link
Contributor

In order to pass the query plan to different nodes in the distributed version, the filters should be able to serialize and deserialize, which is implemented in this PR.

outputStream.write(filterType.ordinal());
ReadWriteIOUtils.writeObject(value, outputStream);
} catch (IOException ignored) {
// ignored
Copy link
Member

Choose a reason for hiding this comment

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

log?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This DataOutputStream is backed-up with a ByteArrayOutputStream, technically, there is no chance that an exception will be thrown.

outputStream.write(filterType.ordinal());
ReadWriteIOUtils.writeObject(value, outputStream);
} catch (IOException ignored) {
// ignored
Copy link
Contributor

Choose a reason for hiding this comment

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

But I don't think there was no chance to throw an Exception even it sounds safe technically. In case it has an exception, it'll be hopeless to locate the bug even if it's a bug from JDK.

@qiaojialin qiaojialin merged commit e7adcbb into master Dec 24, 2019
@qiaojialin qiaojialin deleted the serialize_filters branch December 24, 2019 12:09
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.

3 participants