aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-03-29 16:00:32 +0200
committerGitHub <noreply@github.com>2022-03-29 16:00:32 +0200
commitdc45403e426237d940544b4929f5e9f31c259d0e (patch)
tree9e63da857906708a587b0050a679ce2a72719d28 /searchcore
parent55a68fe347b0b551cd3421d014fabcf3be4f525d (diff)
parent2d197543db1491993c194c29be88a5ad33c383fb (diff)
Merge pull request #21856 from vespa-engine/balder/avoid-identifiable-for-valueupdate-2
Balder/avoid identifiable for valueupdate 2
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_test.cpp15
-rw-r--r--searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp138
-rw-r--r--searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp4
-rw-r--r--searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp2
-rw-r--r--searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/bmcluster/bm_feed.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp18
7 files changed, 78 insertions, 103 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_test.cpp b/searchcore/src/tests/proton/attribute/attribute_test.cpp
index 51bc60d3783..de6b923bdc1 100644
--- a/searchcore/src/tests/proton/attribute/attribute_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_test.cpp
@@ -526,9 +526,8 @@ TEST_F(AttributeWriterTest, handles_predicate_update)
const document::DocumentType &dt(idb.getDocumentType());
DocumentUpdate upd(*idb.getDocumentTypeRepo(), dt, DocumentId("id:ns:searchdocument::1"));
- PredicateFieldValue new_value(builder.feature("foo").value("bar").build());
upd.addUpdate(FieldUpdate(upd.getType().getField("a1"))
- .addUpdate(std::make_unique<AssignValueUpdate>(new_value)));
+ .addUpdate(std::make_unique<AssignValueUpdate>(std::make_unique<PredicateFieldValue>(builder.feature("foo").value("bar").build()))));
PredicateIndex &index = static_cast<PredicateAttribute &>(*a1).getIndex();
EXPECT_EQ(1u, index.getZeroConstraintDocs().size());
@@ -726,10 +725,10 @@ TEST_F(AttributeWriterTest, handles_tensor_assign_update)
auto new_tensor = make_tensor(TensorSpec(sparse_tensor)
.add({{"x", "8"}, {"y", "9"}}, 11));
TensorDataType xySparseTensorDataType(vespalib::eval::ValueType::from_spec(sparse_tensor));
- TensorFieldValue new_value(xySparseTensorDataType);
- new_value = SimpleValue::from_value(*new_tensor);
+ auto new_value = std::make_unique<TensorFieldValue>(xySparseTensorDataType);
+ *new_value = SimpleValue::from_value(*new_tensor);
upd.addUpdate(FieldUpdate(upd.getType().getField("a1"))
- .addUpdate(std::make_unique<AssignValueUpdate>(new_value)));
+ .addUpdate(std::make_unique<AssignValueUpdate>(std::move(new_value))));
DummyFieldUpdateCallback onUpdate;
update(2, upd, 1, onUpdate);
EXPECT_EQ(2u, a1->getNumDocs());
@@ -936,9 +935,9 @@ public:
builder.getDocumentType(),
DocumentId(doc_id));
TensorDataType tensor_type(vespalib::eval::ValueType::from_spec(dense_tensor));
- TensorFieldValue tensor_value(tensor_type);
- tensor_value= SimpleValue::from_value(*tensor);
- upd->addUpdate(FieldUpdate(upd->getType().getField("a1")).addUpdate(std::make_unique<AssignValueUpdate>(tensor_value)));
+ auto tensor_value = std::make_unique<TensorFieldValue>(tensor_type);
+ *tensor_value = SimpleValue::from_value(*tensor);
+ upd->addUpdate(FieldUpdate(upd->getType().getField("a1")).addUpdate(std::make_unique<AssignValueUpdate>(std::move(tensor_value))));
return upd;
}
void expect_shared_executor_tasks(size_t exp_accepted_tasks) {
diff --git a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp
index 20584a2a1fb..8fa5c2994b0 100644
--- a/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp
+++ b/searchcore/src/tests/proton/common/attribute_updater/attribute_updater_test.cpp
@@ -104,21 +104,21 @@ struct Fixture {
vec.commit();
}
- void applyArrayUpdates(AttributeVector & vec, const FieldValue & assign,
- const FieldValue & first, const FieldValue & second) {
- applyValueUpdate(vec, 0, std::make_unique<AssignValueUpdate>(assign));
- applyValueUpdate(vec, 1, std::make_unique<AddValueUpdate>(second));
- applyValueUpdate(vec, 2, std::make_unique<RemoveValueUpdate>(first));
+ void applyArrayUpdates(AttributeVector & vec, std::unique_ptr<FieldValue> assign,
+ std::unique_ptr<FieldValue> first, std::unique_ptr<FieldValue> second) {
+ applyValueUpdate(vec, 0, std::make_unique<AssignValueUpdate>(std::move(assign)));
+ applyValueUpdate(vec, 1, std::make_unique<AddValueUpdate>(std::move(second)));
+ applyValueUpdate(vec, 2, std::make_unique<RemoveValueUpdate>(std::move(first)));
applyValueUpdate(vec, 3, std::make_unique<ClearValueUpdate>());
}
- void applyWeightedSetUpdates(AttributeVector & vec, const FieldValue & assign,
- const FieldValue & first, const FieldValue & second) {
- applyValueUpdate(vec, 0, std::make_unique<AssignValueUpdate>(assign));
- applyValueUpdate(vec, 1, std::make_unique<AddValueUpdate>(second, 20));
- applyValueUpdate(vec, 2, std::make_unique<RemoveValueUpdate>(first));
+ void applyWeightedSetUpdates(AttributeVector & vec, std::unique_ptr<FieldValue> assign,
+ std::unique_ptr<FieldValue> first, std::unique_ptr<FieldValue> copyOfFirst, std::unique_ptr<FieldValue> second) {
+ applyValueUpdate(vec, 0, std::make_unique<AssignValueUpdate>(std::move(assign)));
+ applyValueUpdate(vec, 1, std::make_unique<AddValueUpdate>(std::move(second), 20));
+ applyValueUpdate(vec, 2, std::make_unique<RemoveValueUpdate>(std::move(first)));
applyValueUpdate(vec, 3, std::make_unique<ClearValueUpdate>());
- applyValueUpdate(vec, 4, std::make_unique<MapValueUpdate>(first, std::make_unique<ArithmeticValueUpdate>(ArithmeticValueUpdate::Add, 10)));
+ applyValueUpdate(vec, 4, std::make_unique<MapValueUpdate>(std::move(copyOfFirst), std::make_unique<ArithmeticValueUpdate>(ArithmeticValueUpdate::Add, 10)));
}
};
@@ -203,10 +203,8 @@ TEST_F("require that single attributes are updated", Fixture)
CollectionType ct(CollectionType::SINGLE);
{
BasicType bt(BasicType::INT32);
- AttributePtr vec = create<int32_t, IntegerAttribute>(3, 32, 0,
- "in1/int",
- Config(bt, ct));
- f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(IntFieldValue(64)));
+ AttributePtr vec = create<int32_t, IntegerAttribute>(3, 32, 0, "in1/int", Config(bt, ct));
+ f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(std::make_unique<IntFieldValue>(64)));
f.applyValueUpdate(*vec, 1, std::make_unique<ArithmeticValueUpdate>(ArithmeticValueUpdate::Add, 10));
f.applyValueUpdate(*vec, 2, std::make_unique<ClearValueUpdate>());
EXPECT_EQUAL(3u, vec->getNumDocs());
@@ -216,11 +214,8 @@ TEST_F("require that single attributes are updated", Fixture)
}
{
BasicType bt(BasicType::FLOAT);
- AttributePtr vec = create<float, FloatingPointAttribute>(3, 55.5f, 0,
- "in1/float",
- Config(bt,
- ct));
- f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(FloatFieldValue(77.7f)));
+ AttributePtr vec = create<float, FloatingPointAttribute>(3, 55.5f, 0, "in1/float",Config(bt, ct));
+ f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(std::make_unique<FloatFieldValue>(77.7f)));
f.applyValueUpdate(*vec, 1, std::make_unique<ArithmeticValueUpdate>(ArithmeticValueUpdate::Add, 10));
f.applyValueUpdate(*vec, 2, std::make_unique<ClearValueUpdate>());
EXPECT_EQUAL(3u, vec->getNumDocs());
@@ -230,11 +225,8 @@ TEST_F("require that single attributes are updated", Fixture)
}
{
BasicType bt(BasicType::STRING);
- AttributePtr vec = create<std::string, StringAttribute>(3, "first", 0,
- "in1/string",
- Config(bt,
- ct));
- f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(StringFieldValue("second")));
+ AttributePtr vec = create<std::string, StringAttribute>(3, "first", 0, "in1/string",Config(bt, ct));
+ f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(StringFieldValue::make("second")));
f.applyValueUpdate(*vec, 2, std::make_unique<ClearValueUpdate>());
EXPECT_EQUAL(3u, vec->getNumDocs());
EXPECT_TRUE(check(vec, 0, std::vector<WeightedString>{WeightedString("second")}));
@@ -254,7 +246,7 @@ TEST_F("require that single attributes are updated", Fixture)
asReferenceAttribute(*vec).update(docId, toGid(doc1));
}
vec->commit();
- f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(ReferenceFieldValue(dynamic_cast<const ReferenceDataType &>(f.docType->getField("ref").getDataType()), DocumentId(doc2))));
+ f.applyValueUpdate(*vec, 0, std::make_unique<AssignValueUpdate>(std::make_unique<ReferenceFieldValue>(dynamic_cast<const ReferenceDataType &>(f.docType->getField("ref").getDataType()), DocumentId(doc2))));
f.applyValueUpdate(*vec, 2, std::make_unique<ClearValueUpdate>());
EXPECT_EQUAL(3u, vec->getNumDocs());
TEST_DO(assertRef(*vec, doc2, 0));
@@ -268,14 +260,12 @@ TEST_F("require that array attributes are updated", Fixture)
CollectionType ct(CollectionType::ARRAY);
{
BasicType bt(BasicType::INT32);
- AttributePtr vec = create<int32_t, IntegerAttribute>(5, 32, 1,
- "in1/aint",
- Config(bt, ct));
- IntFieldValue first(32);
- IntFieldValue second(64);
- ArrayFieldValue assign(f.docType->getField("aint").getDataType());
- assign.add(second);
- f.applyArrayUpdates(*vec, assign, first, second);
+ AttributePtr vec = create<int32_t, IntegerAttribute>(5, 32, 1, "in1/aint", Config(bt, ct));
+ auto first = std::make_unique<IntFieldValue>(32);
+ auto second = std::make_unique<IntFieldValue>(64);
+ auto assign = std::make_unique<ArrayFieldValue>(f.docType->getField("aint").getDataType());
+ assign->add(*second);
+ f.applyArrayUpdates(*vec, std::move(assign), std::move(first), std::move(second));
EXPECT_EQUAL(5u, vec->getNumDocs());
EXPECT_TRUE(check(vec, 0, std::vector<WeightedInt>{WeightedInt(64)}));
@@ -286,15 +276,12 @@ TEST_F("require that array attributes are updated", Fixture)
}
{
BasicType bt(BasicType::FLOAT);
- AttributePtr vec = create<float, FloatingPointAttribute>(5, 55.5f, 1,
- "in1/afloat",
- Config(bt,
- ct));
- FloatFieldValue first(55.5f);
- FloatFieldValue second(77.7f);
- ArrayFieldValue assign(f.docType->getField("afloat").getDataType());
- assign.add(second);
- f.applyArrayUpdates(*vec, assign, first, second);
+ AttributePtr vec = create<float, FloatingPointAttribute>(5, 55.5f, 1, "in1/afloat", Config(bt, ct));
+ auto first = std::make_unique<FloatFieldValue>(55.5f);
+ auto second = std::make_unique<FloatFieldValue>(77.7f);
+ auto assign = std::make_unique<ArrayFieldValue>(f.docType->getField("afloat").getDataType());
+ assign->add(*second);
+ f.applyArrayUpdates(*vec, std::move(assign), std::move(first), std::move(second));
EXPECT_EQUAL(5u, vec->getNumDocs());
EXPECT_TRUE(check(vec, 0, std::vector<WeightedFloat>{WeightedFloat(77.7f)}));
@@ -305,14 +292,12 @@ TEST_F("require that array attributes are updated", Fixture)
}
{
BasicType bt(BasicType::STRING);
- AttributePtr vec = create<std::string, StringAttribute>(5, "first", 1,
- "in1/astring",
- Config(bt, ct));
- StringFieldValue first("first");
- StringFieldValue second("second");
- ArrayFieldValue assign(f.docType->getField("astring").getDataType());
- assign.add(second);
- f.applyArrayUpdates(*vec, assign, first, second);
+ AttributePtr vec = create<std::string, StringAttribute>(5, "first", 1, "in1/astring", Config(bt, ct));
+ auto first = StringFieldValue::make("first");
+ auto second = StringFieldValue::make("second");
+ auto assign = std::make_unique<ArrayFieldValue>(f.docType->getField("astring").getDataType());
+ assign->add(*second);
+ f.applyArrayUpdates(*vec, std::move(assign), std::move(first), std::move(second));
EXPECT_EQUAL(5u, vec->getNumDocs());
EXPECT_TRUE(check(vec, 0, std::vector<WeightedString>{WeightedString("second")}));
@@ -328,15 +313,13 @@ TEST_F("require that weighted set attributes are updated", Fixture)
CollectionType ct(CollectionType::WSET);
{
BasicType bt(BasicType::INT32);
- AttributePtr vec = create<int32_t, IntegerAttribute>(5, 32, 100,
- "in1/wsint",
- Config(bt, ct));
- IntFieldValue first(32);
- IntFieldValue second(64);
- WeightedSetFieldValue
- assign(f.docType->getField("wsint").getDataType());
- assign.add(second, 20);
- f.applyWeightedSetUpdates(*vec, assign, first, second);
+ AttributePtr vec = create<int32_t, IntegerAttribute>(5, 32, 100, "in1/wsint", Config(bt, ct));
+ auto first = std::make_unique<IntFieldValue>(32);
+ auto copyOfFirst = std::make_unique<IntFieldValue>(32);
+ auto second = std::make_unique<IntFieldValue>(64);
+ auto assign = std::make_unique<WeightedSetFieldValue>(f.docType->getField("wsint").getDataType());
+ assign->add(*second, 20);
+ f.applyWeightedSetUpdates(*vec, std::move(assign), std::move(first), std::move(copyOfFirst), std::move(second));
EXPECT_EQUAL(5u, vec->getNumDocs());
EXPECT_TRUE(check(vec, 0, std::vector<WeightedInt>{WeightedInt(64, 20)}));
@@ -347,16 +330,13 @@ TEST_F("require that weighted set attributes are updated", Fixture)
}
{
BasicType bt(BasicType::FLOAT);
- AttributePtr vec = create<float, FloatingPointAttribute>(5, 55.5f, 100,
- "in1/wsfloat",
- Config(bt,
- ct));
- FloatFieldValue first(55.5f);
- FloatFieldValue second(77.7f);
- WeightedSetFieldValue
- assign(f.docType->getField("wsfloat").getDataType());
- assign.add(second, 20);
- f.applyWeightedSetUpdates(*vec, assign, first, second);
+ AttributePtr vec = create<float, FloatingPointAttribute>(5, 55.5f, 100, "in1/wsfloat", Config(bt, ct));
+ auto first = std::make_unique<FloatFieldValue>(55.5f);
+ auto copyOfFirst = std::make_unique<FloatFieldValue>(55.5f);
+ auto second = std::make_unique<FloatFieldValue>(77.7f);
+ auto assign = std::make_unique<WeightedSetFieldValue>(f.docType->getField("wsfloat").getDataType());
+ assign->add(*second, 20);
+ f.applyWeightedSetUpdates(*vec, std::move(assign), std::move(first), std::move(copyOfFirst), std::move(second));
EXPECT_EQUAL(5u, vec->getNumDocs());
EXPECT_TRUE(check(vec, 0, std::vector<WeightedFloat>{WeightedFloat(77.7f, 20)}));
@@ -367,17 +347,13 @@ TEST_F("require that weighted set attributes are updated", Fixture)
}
{
BasicType bt(BasicType::STRING);
- AttributePtr vec = create<std::string, StringAttribute>(5, "first",
- 100,
- "in1/wsstring",
- Config(bt,
- ct));
- StringFieldValue first("first");
- StringFieldValue second("second");
- WeightedSetFieldValue
- assign(f.docType->getField("wsstring").getDataType());
- assign.add(second, 20);
- f.applyWeightedSetUpdates(*vec, assign, first, second);
+ AttributePtr vec = create<std::string, StringAttribute>(5, "first", 100, "in1/wsstring", Config(bt, ct));
+ auto first = StringFieldValue::make("first");
+ auto copyOfFirst = StringFieldValue::make("first");
+ auto second = StringFieldValue::make("second");
+ auto assign = std::make_unique<WeightedSetFieldValue>(f.docType->getField("wsstring").getDataType());
+ assign->add(*second, 20);
+ f.applyWeightedSetUpdates(*vec, std::move(assign), std::move(first), std::move(copyOfFirst), std::move(second));
EXPECT_EQUAL(5u, vec->getNumDocs());
EXPECT_TRUE(check(vec, 0, std::vector<WeightedString>{WeightedString("second", 20)}));
diff --git a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
index 79aa681ab52..8ef2742b6d8 100644
--- a/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedhandler/feedhandler_test.cpp
@@ -345,7 +345,7 @@ struct UpdateContext {
} else {
fieldValue->assign(document::StringFieldValue("new value"));
}
- update->addUpdate(document::FieldUpdate(field).addUpdate(std::make_unique<document::AssignValueUpdate>(*fieldValue)));
+ update->addUpdate(document::FieldUpdate(field).addUpdate(std::make_unique<document::AssignValueUpdate>(std::move(fieldValue))));
}
};
@@ -774,7 +774,7 @@ TEST_F("require that all value updates will be inspected before rejected", Schem
EXPECT_FALSE(FeedRejectHelper::mustReject(*docUpdate));
docUpdate->addUpdate(std::move(FieldUpdate(docType->getField("i1")).addUpdate(std::make_unique<ClearValueUpdate>())));
EXPECT_FALSE(FeedRejectHelper::mustReject(*docUpdate));
- docUpdate->addUpdate(std::move(FieldUpdate(docType->getField("i1")).addUpdate(std::make_unique<AssignValueUpdate>(StringFieldValue()))));
+ docUpdate->addUpdate(std::move(FieldUpdate(docType->getField("i1")).addUpdate(std::make_unique<AssignValueUpdate>(StringFieldValue::make()))));
EXPECT_TRUE(FeedRejectHelper::mustReject(*docUpdate));
}
diff --git a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
index 40332157a8d..039524a237c 100644
--- a/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
+++ b/searchcore/src/tests/proton/feedoperation/feedoperation_test.cpp
@@ -122,7 +122,7 @@ public:
auto makeUpdate() {
auto upd(std::make_shared<DocumentUpdate>(*_repo, _docType, docId));
upd->addUpdate(FieldUpdate(upd->getType().getField("string")).
- addUpdate(std::make_unique<AssignValueUpdate>(StringFieldValue("newval"))));
+ addUpdate(std::make_unique<AssignValueUpdate>(StringFieldValue::make("newval"))));
return upd;
}
auto makeDoc() {
diff --git a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp
index 7f35e05dfb6..6fb7a35fffe 100644
--- a/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp
+++ b/searchcore/src/tests/proton/persistenceengine/persistenceengine_test.cpp
@@ -521,7 +521,7 @@ TEST_F("require that update is rejected if resource limit is reached", SimpleFix
document::Field field("string", 1, *document::DataType::STRING);
type.addField(field);
DocumentUpdate::SP upd = createUpd(type, docId1);
- upd->addUpdate(std::move(document::FieldUpdate(field).addUpdate(std::make_unique<document::AssignValueUpdate>(document::StringFieldValue("new value")))));
+ upd->addUpdate(std::move(document::FieldUpdate(field).addUpdate(std::make_unique<document::AssignValueUpdate>(std::make_unique<document::StringFieldValue>("new value")))));
EXPECT_EQUAL(
Result(Result::ErrorType::RESOURCE_EXHAUSTED,
diff --git a/searchcore/src/vespa/searchcore/bmcluster/bm_feed.cpp b/searchcore/src/vespa/searchcore/bmcluster/bm_feed.cpp
index 2dcf18f9da6..0856bad0035 100644
--- a/searchcore/src/vespa/searchcore/bmcluster/bm_feed.cpp
+++ b/searchcore/src/vespa/searchcore/bmcluster/bm_feed.cpp
@@ -71,7 +71,7 @@ BmFeed::make_document_update(uint32_t n, uint32_t i) const
{
auto id = make_document_id(n, i);
auto document_update = std::make_unique<DocumentUpdate>(*_repo, *_document_type, id);
- document_update->addUpdate(FieldUpdate(_field).addUpdate(std::make_unique<AssignValueUpdate>(IntFieldValue(15))));
+ document_update->addUpdate(FieldUpdate(_field).addUpdate(std::make_unique<AssignValueUpdate>(std::make_unique<IntFieldValue>(15))));
return document_update;
}
diff --git a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp
index 5b134c65e84..fe29a11639b 100644
--- a/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp
+++ b/searchcore/src/vespa/searchcore/proton/common/attribute_updater.cpp
@@ -157,12 +157,12 @@ AttributeUpdater::handleUpdateT(V & vec, Accessor, uint32_t lid, const ValueUpda
const MapValueUpdate & map(static_cast<const MapValueUpdate &>(upd));
if (!vec.AttributeVector::apply(lid, map)) {
throw UpdateException(make_string("attribute map(%s, %s) failed: %s[%u]",
- map.getKey().className(), map.getUpdate().getClass().name(),
+ map.getKey().className(), map.getUpdate().className(),
vec.getName().c_str(), lid));
}
} else {
LOG(warning, "Unsupported value update operation %s on multivalue vector %s",
- upd.getClass().name(), vec.getName().c_str());
+ upd.className(), vec.getName().c_str());
}
} else {
if (op == ValueUpdate::Assign) {
@@ -178,7 +178,7 @@ AttributeUpdater::handleUpdateT(V & vec, Accessor, uint32_t lid, const ValueUpda
} else if (op == ValueUpdate::Clear) {
vec.clearDoc(lid);
} else {
- LOG(warning, "Unsupported value update operation %s on singlevalue vector %s", upd.getClass().name(), vec.getName().c_str());
+ LOG(warning, "Unsupported value update operation %s on singlevalue vector %s", upd.className(), vec.getName().c_str());
}
}
}
@@ -200,7 +200,7 @@ AttributeUpdater::handleUpdate(PredicateAttribute &vec, uint32_t lid, const Valu
vec.clearDoc(lid);
} else {
LOG(warning, "Unsupported value update operation %s on singlevalue vector %s",
- upd.getClass().name(), vec.getName().c_str());
+ upd.className(), vec.getName().c_str());
}
}
@@ -217,17 +217,17 @@ AttributeUpdater::handleUpdate(TensorAttribute &vec, uint32_t lid, const ValueUp
vec.clearDoc(lid);
updateValue(vec, lid, assign.getValue());
}
- } else if (op == ValueUpdate::TensorModifyUpdate) {
+ } else if (op == ValueUpdate::TensorModify) {
vec.update_tensor(lid, static_cast<const TensorModifyUpdate &>(upd), false);
- } else if (op == ValueUpdate::TensorAddUpdate) {
+ } else if (op == ValueUpdate::TensorAdd) {
vec.update_tensor(lid, static_cast<const TensorAddUpdate &>(upd), true);
- } else if (op == ValueUpdate::TensorRemoveUpdate) {
+ } else if (op == ValueUpdate::TensorRemove) {
vec.update_tensor(lid, static_cast<const TensorRemoveUpdate &>(upd), false);
} else if (op == ValueUpdate::Clear) {
vec.clearDoc(lid);
} else {
LOG(warning, "Unsupported value update operation %s on singlevalue tensor attribute %s",
- upd.getClass().name(), vec.getName().c_str());
+ upd.className(), vec.getName().c_str());
}
}
@@ -247,7 +247,7 @@ AttributeUpdater::handleUpdate(ReferenceAttribute &vec, uint32_t lid, const Valu
vec.clearDoc(lid);
} else {
LOG(warning, "Unsupported value update operation %s on singlevalue reference attribute %s",
- upd.getClass().name(), vec.getName().c_str());
+ upd.className(), vec.getName().c_str());
}
}