Skip to content
Snippets Groups Projects
Commit 6b901967 authored by Christian Humer's avatar Christian Humer
Browse files

Fix but in RMissing filter of CachedVectorNodes. Improved comment about its rationale.

parent 2df624fc
No related branches found
No related tags found
No related merge requests found
......@@ -77,10 +77,17 @@ abstract class CachedVectorNode extends RBaseNode {
}
}
@ExplodeLoop
protected Object[] filterPositions(Object[] positions) {
// we assume that the positions count cannot change as the isRemovePosition check
// is just based on types and therefore does not change per position instance.
/*
* we assume that the positions count cannot change as the isRemovePosition check is just
* based on types and therefore does not change per position instance.
*
* normally empty positions are just empty but with S3 function dispatch it may happen that
* positions are also of type RMissing. These values should not contribute to the access
* dimensions.
*
* Example test case: dimensions.x<-data.frame(c(1,2), c(3,4)); x[1]
*/
assert initializeFilteredPositionsCount(positions) == filteredPositionsLength;
if (filteredPositionsLength != -1) {
Object[] newPositions = new Object[filteredPositionsLength];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment