@Override protected R visitCreateTableAsSelect(final CreateTableAsSelect node, final C context) { process(node.getQuery(), context); node.getProperties().values().forEach(expression -> process(expression, context)); return null; }
@Override protected R visitCreateTableAsSelect(final CreateTableAsSelect node, final C context) { process(node.getQuery(), context); node.getProperties().values().forEach(expression -> process(expression, context)); return null; }
@Override protected Void visitCreateTableAsSelect(final CreateTableAsSelect node, final Integer indent) { builder.append("CREATE TABLE "); if (node.isNotExists()) { builder.append("IF NOT EXISTS "); } builder.append(node.getName()); if (!node.getProperties().isEmpty()) { builder.append(" WITH ("); Joiner.on(", ") .appendTo(builder, transform( node.getProperties().entrySet(), entry -> entry.getKey() + " = " + ExpressionFormatter .formatExpression(entry.getValue()))); builder.append(")"); } builder.append(" AS "); process(node.getQuery(), indent); return null; }
@Override protected Node visitCreateTableAsSelect(final CreateTableAsSelect node, final Node parent) { node.setParent(parent); process(node.getQuery(), node); node.getProperties().values().forEach(expression -> process(expression, node)); return null; }
protected Node visitCreateTableAsSelect(final CreateTableAsSelect node, final Object context) { return new CreateTableAsSelect(node.getLocation(), node.getName(), (Query) process(node.getQuery(), context), node.isNotExists(), node.getProperties().entrySet().stream() .collect(Collectors.toMap( Entry::getKey, e -> (Expression) process(e.getValue(), context) ))); }