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

Remove min/max from SimpleVector #1239

Closed

Conversation

kevinwilfong
Copy link
Contributor

Summary:
Today SimpleVector may receive the min/max values as part of its metadata which means
they need to be serialized/deserialized to strings.

This seems inefficient, and it doesn't work for types like opaque which can't necessarily
be converted to strings a straight forward way.

Moreover, it doesn't look like these values are used anywhere outside of tests, so I'm
opting to just remove them. If we need them, passing them as std::optional seems
like a better way.

I'm also changing BiasVector to take the bias directly, instead of doing the same
serialization/deserialization.

Can we get rid of metadata entirely? Or use a properly typed class instead of a mapping from string:string?

Differential Revision: D34980442

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Mar 18, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D34980442

Summary:
Pull Request resolved: facebookincubator#1239

Today SimpleVector may receive the min/max values as part of its metadata which means
they need to be serialized/deserialized to strings.

This seems inefficient, and it doesn't work for types like opaque which can't necessarily
be converted to strings a straight forward way.

Moreover, it doesn't look like these values are used anywhere outside of tests, so I'm
opting to just remove them.  If we need them, passing them as std::optional<T> seems
like a better way.

I'm also changing BiasVector to take the bias directly, instead of doing the same
serialization/deserialization.

Can we get rid of metadata entirely?  Or use a properly typed class instead of a mapping from string:string?

Differential Revision: D34980442

fbshipit-source-id: ec7488d4adf27ad7d206f3c5cdb2d6aa865d3de1
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D34980442

@yingsu00
Copy link
Collaborator

Having these min/max values will be potentially useful in operators like sort and window functions. Is serializing/deserializing the two values an expensive option? How much can we gain in terms of perf and size on wire?

@kevinwilfong
Copy link
Contributor Author

Found some use cases that were using these, took another approach in #1347

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants