velox icon indicating copy to clipboard operation
velox copied to clipboard

Fix handling of NaN for map variants

Open bikramSingh91 opened this issue 9 months ago • 7 comments

Summary: Highlights of the this change:

  • Introduces a utility functors for floating point types that provide comparator and hash functor to implement consistent behavior or NaNs across the codebase. These can be passed to standard containers and functions like std::map and std::sort, etc.
  • These utility functors will be used in upcoming changes to fixes for NaN behavior across the codebase wherever folly or std containers or functions are used that can accept such functors.
  • Fix NaN handling of floating points for map variants which uses a std::map to hold key and value variants. Without this, using NaN as a key would result in an inconsistent state because NaN cannot be compared with other values. This resulted in inconsistent comparison of map vectors in tests where QueryAssertions.h uses a map variant to compare such vectors. (See asserEqualResults())

Differential Revision: D57187815

bikramSingh91 avatar May 09 '24 23:05 bikramSingh91

Deploy Preview for meta-velox canceled.

Name Link
Latest commit f4896c36bdb25db94b33af47c853a986146f5cf3
Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/66468c1d1ea50c00082f4dd2

netlify[bot] avatar May 09 '24 23:05 netlify[bot]

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

facebook-github-bot avatar May 09 '24 23:05 facebook-github-bot

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

facebook-github-bot avatar May 10 '24 17:05 facebook-github-bot

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

facebook-github-bot avatar May 10 '24 21:05 facebook-github-bot

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

facebook-github-bot avatar May 10 '24 21:05 facebook-github-bot

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

facebook-github-bot avatar May 10 '24 23:05 facebook-github-bot

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

facebook-github-bot avatar May 13 '24 18:05 facebook-github-bot

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

facebook-github-bot avatar May 15 '24 21:05 facebook-github-bot

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

facebook-github-bot avatar May 16 '24 21:05 facebook-github-bot

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

facebook-github-bot avatar May 16 '24 21:05 facebook-github-bot

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

facebook-github-bot avatar May 16 '24 22:05 facebook-github-bot

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

facebook-github-bot avatar May 16 '24 22:05 facebook-github-bot

This pull request has been merged in facebookincubator/velox@8f3c806e6c74e29a1209047752730bc474f10409.

facebook-github-bot avatar May 20 '24 20:05 facebook-github-bot