String collectionName = getCollectionName(opRef);
if (collectionName != null) {
// Build the new operator and update the query plan.
int collectionId = vxqueryContext.newCollectionId();
VXQueryCollectionDataSource ds = VXQueryCollectionDataSource.create(collectionId, collectionName,
SequenceType.create(AnyItemType.INSTANCE, Quantifier.QUANT_STAR));
if (ds != null) {
ds.setTotalDataSources(vxqueryContext.getTotalDataSources());
// Known to be true because of collection name.
AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
UnnestOperator unnest = (UnnestOperator) op;
AbstractLogicalOperator op2 = (AbstractLogicalOperator) unnest.getInputs().get(0).getValue();