@@ -135,16 +135,16 @@ protected List<DefinedTable> parseCreateTable(
135
135
SqlNodeList nodeList = parser .parseStmtList ();
136
136
for (SqlNode parsed : nodeList ) {
137
137
if (!(parsed instanceof SqlCreateTable )) {
138
- fail ("Not a valid CREATE TABLE statement." );
138
+ throw fail ("Not a valid CREATE TABLE statement." );
139
139
}
140
140
141
141
SqlCreateTable create = (SqlCreateTable ) parsed ;
142
142
if (create .name .names .size () > 1 ) {
143
- fail ("Only simple table names are allowed." , create .name .getParserPosition ());
143
+ throw fail ("Only simple table names are allowed." , create .name .getParserPosition ());
144
144
}
145
145
146
146
if (create .query != null ) {
147
- fail ("CTAS not supported." , create .name .getParserPosition ());
147
+ throw fail ("CTAS not supported." , create .name .getParserPosition ());
148
148
}
149
149
150
150
List <String > names = new ArrayList <>();
@@ -158,12 +158,12 @@ protected List<DefinedTable> parseCreateTable(
158
158
continue ;
159
159
}
160
160
161
- fail ("Unexpected column list construction." , node .getParserPosition ());
161
+ throw fail ("Unexpected column list construction." , node .getParserPosition ());
162
162
}
163
163
164
164
SqlColumnDeclaration col = (SqlColumnDeclaration ) node ;
165
165
if (col .name .names .size () != 1 ) {
166
- fail ("Expected simple column names." , col .name .getParserPosition ());
166
+ throw fail ("Expected simple column names." , col .name .getParserPosition ());
167
167
}
168
168
169
169
names .add (col .name .names .get (0 ));
0 commit comments