Skip to content

Commit

Permalink
Fix bugs in MinMaxDataMap
Browse files Browse the repository at this point in the history
make minmax datamap useable and add more tests for it
  • Loading branch information
xuchuanyin committed Aug 31, 2018
1 parent 0664a1a commit f29ec1d
Show file tree
Hide file tree
Showing 21 changed files with 1,731 additions and 721 deletions.
Expand Up @@ -48,6 +48,10 @@ public class DummyStatsCollector implements ColumnPageStatsCollector {
return BYTE_ARRAY;
}

@Override
public void clear() {

}
};

@Override public void updateNull(int rowId) {
Expand Down
Expand Up @@ -107,6 +107,11 @@ public SimpleStatsResult getPageStats() {
return dataType;
}

@Override
public void clear() {
min = null;
max = null;
}
};
}
}
Expand Up @@ -105,6 +105,11 @@ public SimpleStatsResult getPageStats() {
return DataTypes.STRING;
}

@Override
public void clear() {
min = null;
max = null;
}
};
}
}
Expand Up @@ -120,6 +120,10 @@ public static PrimitivePageStatsCollector newInstance(ValueEncoderMeta meta) {

private PrimitivePageStatsCollector(DataType dataType) {
this.dataType = dataType;
resetPageStats();
}

private void resetPageStats() {
if (dataType == DataTypes.BOOLEAN) {
minByte = TRUE_VALUE;
maxByte = FALSE_VALUE;
Expand Down Expand Up @@ -343,4 +347,8 @@ public DataType getDataType() {
return dataType;
}

@Override
public void clear() {
resetPageStats();
}
}
Expand Up @@ -29,4 +29,8 @@ public interface SimpleStatsResult {

DataType getDataType();

/**
* clear the statistics info for resuse
*/
void clear();
}

This file was deleted.

0 comments on commit f29ec1d

Please sign in to comment.