s.removeIndexPoint(pt, data.getPartitionBy(), data.getPartitionBy());
changedCounter++;
} else {
TypedRow val = row.getValue();
TypedColumn column = val.getColumn(colName);
if (column == null) {
//It means column was deleted by user. Doing nothing as of now
changedCounter++;
continue;
}
Object value = column.getValue();
if(!valuesEqual(pt.getIndexedValue(), value)) {
System.out.println("Entity with rowkey="+pt.getKeyAsString()+" has extra incorrect index point with value="+pt.getIndexedValueAsString()+" correct value should be="+column.getValueAsString());
s.removeIndexPoint(pt, data.getPartitionBy(), data.getPartitionId());
IndexColumn col = new IndexColumn();
col.setColumnName(colName);
col.setPrimaryKey(pt.getRawKey());
byte[] indValue = column.getValueRaw();
col.setIndexedValue(indValue);
IndexPoint newPoint = new IndexPoint(pt.getRowKeyMeta(), col , data.getColumnMeta());
s.addIndexPoint(newPoint, data.getPartitionBy(), data.getPartitionId());
changedCounter++;
}