fix: cannot drop function
diff --git a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
index 5aca7c4..4daf8b5 100644
--- a/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
+++ b/asterix-metadata/src/main/java/edu/uci/ics/asterix/metadata/MetadataNode.java
@@ -265,7 +265,7 @@
ILSMIndex lsmIndex = (ILSMIndex) indexLifecycleManager.getIndex(resourceID);
indexLifecycleManager.open(resourceID);
- //prepare a Callback for logging
+ // prepare a Callback for logging
IModificationOperationCallback modCallback = createIndexModificationCallback(jobId, resourceID, metadataIndex,
lsmIndex, IndexOperation.INSERT);
@@ -376,7 +376,8 @@
searchKey);
deleteTupleFromIndex(jobId, MetadataPrimaryIndexes.DATASET_DATASET, datasetTuple);
} catch (TreeIndexException tie) {
- //ignore this exception and continue deleting all relevant artifacts.
+ // ignore this exception and continue deleting all relevant
+ // artifacts.
}
// Delete entry from secondary index 'group'.
@@ -390,7 +391,8 @@
MetadataSecondaryIndexes.GROUPNAME_ON_DATASET_INDEX, groupNameSearchKey);
deleteTupleFromIndex(jobId, MetadataSecondaryIndexes.GROUPNAME_ON_DATASET_INDEX, groupNameTuple);
} catch (TreeIndexException tie) {
- //ignore this exception and continue deleting all relevant artifacts.
+ // ignore this exception and continue deleting all relevant
+ // artifacts.
}
}
// Delete entry from secondary index 'type'.
@@ -402,7 +404,8 @@
MetadataSecondaryIndexes.DATATYPENAME_ON_DATASET_INDEX, dataTypeSearchKey);
deleteTupleFromIndex(jobId, MetadataSecondaryIndexes.DATATYPENAME_ON_DATASET_INDEX, dataTypeTuple);
} catch (TreeIndexException tie) {
- //ignore this exception and continue deleting all relevant artifacts.
+ // ignore this exception and continue deleting all relevant
+ // artifacts.
}
// Delete entry(s) from the 'indexes' dataset.
@@ -502,7 +505,8 @@
// Searches the index for the tuple to be deleted. Acquires an S
// lock on the 'datatype' dataset.
ITupleReference tuple = getTupleToBeDeleted(jobId, MetadataPrimaryIndexes.DATATYPE_DATASET, searchKey);
- // This call uses the secondary index on datatype. Get nested types before deleting entry from secondary index.
+ // This call uses the secondary index on datatype. Get nested types
+ // before deleting entry from secondary index.
List<String> nestedTypes = getNestedDatatypeNames(jobId, dataverseName, datatypeName);
deleteTupleFromIndex(jobId, MetadataPrimaryIndexes.DATATYPE_DATASET, tuple);
deleteFromDatatypeSecondaryIndex(jobId, dataverseName, datatypeName);
@@ -568,7 +572,7 @@
long resourceID = metadataIndex.getResourceID();
ILSMIndex lsmIndex = (ILSMIndex) indexLifecycleManager.getIndex(resourceID);
indexLifecycleManager.open(resourceID);
- //prepare a Callback for logging
+ // prepare a Callback for logging
IModificationOperationCallback modCallback = createIndexModificationCallback(jobId, resourceID, metadataIndex,
lsmIndex, IndexOperation.DELETE);
IIndexAccessor indexAccessor = lsmIndex.createAccessor(modCallback, NoOpOperationCallback.INSTANCE);
@@ -822,7 +826,8 @@
}
try {
// Delete entry from the 'function' dataset.
- ITupleReference searchKey = createTuple(functionSignature.getNamespace(), functionSignature.getName());
+ ITupleReference searchKey = createTuple(functionSignature.getNamespace(), functionSignature.getName(), ""
+ + functionSignature.getArity());
// Searches the index for the tuple to be deleted. Acquires an S
// lock on the 'function' dataset.
ITupleReference datasetTuple = getTupleToBeDeleted(jobId, MetadataPrimaryIndexes.FUNCTION_DATASET,
@@ -853,7 +858,7 @@
return results.get(0);
}
- //Debugging Method
+ // Debugging Method
public String printMetadata() {
StringBuilder sb = new StringBuilder();