Closed
Description
Is there a reason why TablesNamesFinder
supports a CREATE TABLE
but throws an exception for a CREATE VIEW
?
Wouldn't the implementation be almost identical?
The current implementation is
@Override
public <S> Void visit(CreateView createView, S context) {
throwUnsupported(createView);
return null;
}
It seems that it could easily be replaced with
@Override
public <S> Void visit(CreateView create, S context) {
visit(create.getView(), null);
if (create.getSelect() != null) {
create.getSelect().accept((SelectVisitor<?>) this, context);
}
return null;
}
Which is almost a copy&paste of the CREATE TABLE implementation
@Override
public <S> Void visit(CreateTable create, S context) {
visit(create.getTable(), null);
if (create.getSelect() != null) {
create.getSelect().accept((SelectVisitor<?>) this, context);
}
return null;
}
Metadata
Metadata
Assignees
Labels
No labels