throw new SQLParserInternalException(e);
}
StoreAdapter adapter = store().createAdapter(session, SchemaCache.globalSchema(ais));
CreateAsCompiler compiler = new CreateAsCompiler(server, adapter, false, ais);
PlanContext plan = new PlanContext(compiler);
ASTStatementLoader astStatementLoader = new ASTStatementLoader();
AISBinder binder = new AISBinder(ais, table.getName().getSchemaName());
try {
binder.bind(stmt);
BooleanNormalizer booleanNormalizer = new BooleanNormalizer(parser);
stmt = booleanNormalizer.normalize(stmt);
SubqueryFlattener subqueryFlattener = new SubqueryFlattener(parser);
stmt = subqueryFlattener.flatten((DMLStatementNode)stmt);
} catch (StandardException ex) {
throw new SQLParserInternalException(ex);
}
plan.setPlan(new AST((DMLStatementNode)stmt, null));
astStatementLoader.apply(plan);
List<TableName> tableNames = new ArrayList<>();
Deque<PlanNode> nodeQueue = new LinkedList<>();
nodeQueue.add(plan.getPlan());
while(!nodeQueue.isEmpty()){