Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
0.2.1
-
None
Description
We have three TODO's in this issue.
Namely
// TODO: hack, do not store empty arrays if (itemValue instanceof GenericArray<?>) { if (((GenericArray)itemValue).size() == 0) { continue; } } else if (itemValue instanceof StatefulHashMap<?,?>) { if (((StatefulHashMap)itemValue).size() == 0) { continue; } }
// TODO: hack, do not store empty arrays Object mapValue = map.get(mapKey); if (mapValue instanceof GenericArray<?>) { if (((GenericArray)mapValue).size() == 0) { continue; } } else if (mapValue instanceof StatefulHashMap<?,?>) { if (((StatefulHashMap)mapValue).size() == 0) { continue; } }
and
case RECORD: if (value != null) { if (value instanceof PersistentBase) { PersistentBase persistentBase = (PersistentBase) value; for (Field member: schema.getFields()) { // TODO: hack, do not store empty arrays Object memberValue = persistentBase.get(member.pos()); if (memberValue instanceof GenericArray<?>) { if (((GenericArray)memberValue).size() == 0) { continue; } } else if (memberValue instanceof StatefulHashMap<?,?>) { if (((StatefulHashMap)memberValue).size() == 0) { continue; } } this.cassandraClient.addSubColumn(key, field.name(), member.name(), memberValue); } } else { LOG.info("Record not supported: " + value.toString()); } } break;
in addGenericArray and addStateulHashMap in CassandraClient and CassandraStore#addOrUpdateField respectively.