-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Fix BaseVector::ensureWritable(*uncached,... &dictionaryCache_); call. dictionaryCache_ is valid only for some rows (cachedDictionaryIndices_), hence, a safe call to BaseVector::ensureWritable must include all the rows not covered by cachedDictionaryIndices_. If BaseVector::ensureWritable is called only for a subset of rows not covered by cachedDictionaryIndices_, it will attempt to copy rows that are not valid leading to a crash. Also, set EvalCtx::isFinalSelection to false when evaluating "uncached" rows to ensure that values in rows copies from the dictionaryCache_ don't get lost. These fixes are band-aids. They are workarounds for the fact that BaseVector::ensureWritable primitive is not safe. It takes a set of rows to make writable and copies all other rows. Since it has no way of knowing which of the other rows are uninitialized it may cause a crash. A proper fix could be to (1) introduce a way to specify that a particular row in a vector is uninitilized and use this information when copying the rows to skip uninitialized rows or (2) change BaseVector::ensureWritable to take a set of rows to preserve and change all the call sites accordingly. Pull Request resolved: #48 Reviewed By: kgpai Differential Revision: D30347269 Pulled By: mbasmanova fbshipit-source-id: 644bb339ee1f84b523f1a205cde265e368b42be3
- Loading branch information
1 parent
53c5637
commit f7601bf
Showing
2 changed files
with
84 additions
and
7 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