use of org.apache.drill.metastore.mongo.operate.MongoDelete in project drill by apache.
the class TestTablesOperationTransformer method testToDeleteOperation.
@Test
public void testToDeleteOperation() {
Bson expected = Filters.and(Filters.eq(MetastoreColumn.STORAGE_PLUGIN.columnName(), "dfs"), Filters.eq(MetastoreColumn.WORKSPACE.columnName(), "tmp"));
FilterExpression filter = FilterExpression.and(FilterExpression.equal(MetastoreColumn.STORAGE_PLUGIN, "dfs"), FilterExpression.equal(MetastoreColumn.WORKSPACE, "tmp"));
Delete delete = Delete.builder().metadataType(MetadataType.ALL).filter(filter).build();
MongoDelete operation = transformer.toDelete(delete);
assertEquals(expected.toString(), operation.filter().toString());
}
Aggregations