use of org.apache.hyracks.data.std.api.INumeric in project asterixdb by apache.
the class PointablePrimitiveValueProviderFactory method createPrimitiveValueProvider.
@Override
public IPrimitiveValueProvider createPrimitiveValueProvider() {
final IPointable p = pf.createPointable();
ITypeTraits traits = pf.getTypeTraits();
assert traits.isFixedLength();
final int length = traits.getFixedLength();
return new IPrimitiveValueProvider() {
@Override
public double getValue(byte[] bytes, int offset) {
p.set(bytes, offset, length);
return ((INumeric) p).doubleValue();
}
};
}
Aggregations