return sql;
}
private void runPlan(String expectedSQL) throws Exception {
DumpGroupLoadablePlan loadablePlan = new DumpGroupLoadablePlan();
DirectObjectPlan plan = loadablePlan.plan();
Schema schema = new Schema(ais());
StoreAdapter adapter = newStoreAdapter(schema);
QueryContext queryContext = new SimpleQueryContext(adapter) {
@Override
public String getCurrentSchema() {
return SCHEMA_NAME;
}
};
QueryBindings queryBindings = queryContext.createBindings();
queryBindings.setValue(0, new Value(MString.varcharFor(SCHEMA_NAME), SCHEMA_NAME));
queryBindings.setValue(1, new Value(MString.varcharFor(groupName), groupName));
if (multiple)
queryBindings.setValue(2, new Value(MNumeric.INT.instance(false), 10));
if (commitFreq > 0)
queryBindings.setValue(3, new Value(MNumeric.INT.instance(false), commitFreq));
DirectObjectCursor cursor = plan.cursor(queryContext, queryBindings);
StringBuilder actual = new StringBuilder();
cursor.open();
while(true) {