parent
d1e2abd1ab
commit
51759a6cee
@ -654,22 +654,24 @@ final class CreateTableImpl extends AbstractQuery implements
|
||||
}
|
||||
}
|
||||
|
||||
private final void acceptSelectInto(Context<?> ctx) {
|
||||
if (FALSE.equals(withData))
|
||||
ctx.data(DATA_SELECT_NO_DATA, true);
|
||||
|
||||
ctx.data(DATA_SELECT_INTO_TABLE, table);
|
||||
|
||||
if (!columnFields.isEmpty())
|
||||
ctx.visit(select(asterisk()).from(table(select).as(table(name("t")), columnFields.toArray(EMPTY_FIELD))));
|
||||
else
|
||||
ctx.visit(select);
|
||||
|
||||
ctx.data().remove(DATA_SELECT_INTO_TABLE);
|
||||
|
||||
if (FALSE.equals(withData))
|
||||
ctx.data().remove(DATA_SELECT_NO_DATA);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private enum OnCommit {
|
||||
DELETE_ROWS,
|
||||
|
||||
@ -2874,10 +2874,11 @@ final class ParserImpl implements Parser {
|
||||
Name fieldName = parseIdentifier(ctx);
|
||||
DataType<?> type = null;
|
||||
|
||||
if (ctas == null && (peek(ctx, ',') || peek(ctx, ')')))
|
||||
ctas = true;
|
||||
else
|
||||
ctas = false;
|
||||
if (ctas == null)
|
||||
if (peek(ctx, ',') || peek(ctx, ')'))
|
||||
ctas = true;
|
||||
else
|
||||
ctas = false;
|
||||
|
||||
type = !TRUE.equals(ctas)
|
||||
? parseDataType(ctx)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user