You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some of my data have negative (or zero) Key values.
When I add them to a GigaMap which has a BinaryIndexerLong, i'm getting an IllegalArgumentException:
java.lang.IllegalArgumentException: Only positive values are allowed: 0 in index com.gork.data.eclipsestore.model.AbstractEntityWithId.BinaryIndexerLong.Abstract
at org.eclipse.store.gigamap.types.BinaryIndexer$Static.validate(BinaryIndexer.java:125) ~[gigamap-3.0.1.jar:na]
Question:
is there a technical reason for that restriction defined in validate(BinaryIndexer.java:125)?
or is there another recommended option for a numeric binary index that can handle negative key values? or IndexerLong?
Thank you in advance for your time and support.
this is my GigaMap and Entity defining the index:
abstract class Entities<ET extends AbstractEntityWithId<ET>> extends LockScope {
public final GigaMap<ET> entities = GigaMap.<ET>Builder()
.withBitmapIdentityIndex(ET.idIndex)
.build();
...
}
public abstract class AbstractEntityWithId<ET> extends AbstractEntity<ET> {
/**
* Id-Index
*/
public static final BinaryIndexerLong<AbstractEntityWithId<?>> idIndex = new BinaryIndexerLong.Abstract<>() {
@Override
public Long getLong(AbstractEntityWithId<?> entity) {
return entity.id;
}
};
protected Long id;
public Long getId() {
return id;
}
...
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Some of my data have negative (or zero) Key values.
When I add them to a GigaMap which has a BinaryIndexerLong, i'm getting an IllegalArgumentException:
Question:
is there a technical reason for that restriction defined in
validate(BinaryIndexer.java:125)?or is there another recommended option for a numeric binary index that can handle negative key values? or IndexerLong?
Thank you in advance for your time and support.
this is my GigaMap and Entity defining the index:
Beta Was this translation helpful? Give feedback.
All reactions