Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions isthmus/src/main/java/io/substrait/isthmus/SqlConverterBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,16 +135,16 @@ protected List<DefinedTable> parseCreateTable(
SqlNodeList nodeList = parser.parseStmtList();
for (SqlNode parsed : nodeList) {
if (!(parsed instanceof SqlCreateTable)) {
fail("Not a valid CREATE TABLE statement.");
throw fail("Not a valid CREATE TABLE statement.");
}

SqlCreateTable create = (SqlCreateTable) parsed;
if (create.name.names.size() > 1) {
fail("Only simple table names are allowed.", create.name.getParserPosition());
throw fail("Only simple table names are allowed.", create.name.getParserPosition());
}

if (create.query != null) {
fail("CTAS not supported.", create.name.getParserPosition());
throw fail("CTAS not supported.", create.name.getParserPosition());
}

List<String> names = new ArrayList<>();
Expand All @@ -158,12 +158,12 @@ protected List<DefinedTable> parseCreateTable(
continue;
}

fail("Unexpected column list construction.", node.getParserPosition());
throw fail("Unexpected column list construction.", node.getParserPosition());
}

SqlColumnDeclaration col = (SqlColumnDeclaration) node;
if (col.name.names.size() != 1) {
fail("Expected simple column names.", col.name.getParserPosition());
throw fail("Expected simple column names.", col.name.getParserPosition());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I / IntelliJ noticed that we created all of these exceptions but never threw them

}

names.add(col.name.names.get(0));
Expand Down
Loading