return Iterables.getOnlyElement(findOperator(plan, operatorClazz));
}
@Test
public void testProjectFilterSubqueryPlan() throws Exception {
LogicalPlan plan = JdbcAssert
.withModel(MODEL, "DONUTS")
.sql(
"select d['name'] as name, d['xx'] as xx from (\n" + " select _MAP['donuts'] as d from donuts)\n"
+ "where cast(d['ppu'] as double) > 0.6")
.logicalPlan();
PlanProperties planProperties = plan.getProperties();
Assert.assertEquals("optiq", planProperties.generator.type);
Assert.assertEquals("na", planProperties.generator.info);
Assert.assertEquals(1, planProperties.version);
Assert.assertEquals(PlanProperties.PlanType.APACHE_DRILL_LOGICAL, planProperties.type);
Map<String, StoragePluginConfig> seConfigs = plan.getStorageEngines();
StoragePluginConfig config = seConfigs.get("donuts-json");
// Assert.assertTrue(config != null && config instanceof ClasspathRSE.ClasspathRSEConfig);
config = seConfigs.get("queue");
// Assert.assertTrue(config != null && config instanceof QueueRSE.QueueRSEConfig);
Scan scan = findOnlyOperator(plan, Scan.class);