forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Lambda expressions can be executed multiple times on the same input batch, such as with the `reduce` function which applies a lambda function to each element of an input array. It is important to note that each invocation receives a new set of inputs, and any state relevant to one set of inputs should be reset before the next invocation to avoid unintended consequences. An example of such failure that we observed is when shared expressions inside `reduce` inadvertently reused results between invocations because the shared expressions held onto shared results that were indexed based on input vector's address; due to sheer chance, some inputs ended up having the same memory address. Therefore, this change fixes this bug by ensuring this input specific state, currently only limited to shared expressions is reset before every invocation of the lambda. Differential Revision: D56502765
- Loading branch information
1 parent
0643fa5
commit cd141ef
Showing
2 changed files
with
57 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters