Skip to content

Commit

Permalink
Don't use the very-sparse schemes for large chunks
Browse files Browse the repository at this point in the history
Stupid restriction, just needs a little more thought
  • Loading branch information
cliffclick committed Nov 16, 2013
1 parent af19aa4 commit 42d8296
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/water/fvec/NewChunk.java
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,8 @@ Chunk compress() {
// Result column must hold floats?
final boolean fpoint = xmin < 0 || min < Long.MIN_VALUE || max > Long.MAX_VALUE;
// Highly sparse but not a bitvector or constant?
if( !fpoint && (_nzCnt+_naCnt)*8 < _len2 &&
lemin > Short.MIN_VALUE && lemax <= Short.MAX_VALUE ) // Only handling unbiased shorts here
if( !fpoint && (_nzCnt+_naCnt)*8 < _len2 && _len2 < 65535 && // (and not too big?)
lemin > Short.MIN_VALUE && lemax <= Short.MAX_VALUE ) // Only handling unbiased shorts here
if( _len2==_len ) return new CX2Chunk(_ls,_xs,_len2,_nzCnt,_naCnt); // Sparse byte chunk
else return new CX2Chunk(_ls,_xs,_len2,_len);

Expand Down

0 comments on commit 42d8296

Please sign in to comment.