ResultColumnList derivedRCL = null;
FromTable fromTable;
FromTable tableReference;
Object[] optionalTableClauses = new Object[OPTIONAL_TABLE_CLAUSES_SIZE];
Properties tableProperties = null;
SubqueryNode derivedTable;
if (jj_2_55(1)) {
if (newInvocationFollows(1)) {
javaToSQLNode = newInvocation();
} else {
switch (jj_nt.kind) {
case TABLE:
javaToSQLNode = vtiTableConstruct();
break;
default:
jj_la1[190] = jj_gen;
jj_consume_token(-1);
throw new ParseException();
}
}
switch (jj_nt.kind) {
case AS:
jj_consume_token(AS);
break;
default:
jj_la1[191] = jj_gen;
;
}
correlationName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
switch (jj_nt.kind) {
case LEFT_PAREN:
jj_consume_token(LEFT_PAREN);
derivedRCL = derivedColumnList();
jj_consume_token(RIGHT_PAREN);
break;
default:
jj_la1[192] = jj_gen;
;
}
switch (jj_nt.kind) {
case DERBYDASHPROPERTIES:
optionalTableClauses = optionalTableProperties();
break;
default:
jj_la1[193] = jj_gen;
;
}
fromTable = (FromTable) nodeFactory.getNode(
C_NodeTypes.FROM_VTI,
javaToSQLNode.getJavaValueNode(),
correlationName,
derivedRCL,
((optionalTableClauses != null) ?
(Properties) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_TABLE_PROPERTIES] :
(Properties) null),
getContextManager());
{if (true) return fromTable;}
} else if (jj_2_56(1)) {
/* identifier() used to be correlationName() */
tableName = qualifiedName(Limits.MAX_IDENTIFIER_LENGTH);
optionalTableClauses = optionalTableClauses();
fromTable = (FromTable) nodeFactory.getNode(
C_NodeTypes.FROM_BASE_TABLE,
tableName,
(String) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_CORRELATION_NAME],
(ResultColumnList) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_DERIVED_RCL],
(Properties) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_TABLE_PROPERTIES],
getContextManager());
{if (true) return fromTable;}
} else if (getToken(1).kind == LEFT_PAREN &&
(
getToken(2).kind == SELECT ||
getToken(2).kind == VALUES
)) {
derivedTable = derivedTable();
switch (jj_nt.kind) {
case AS:
jj_consume_token(AS);
break;
default:
jj_la1[194] = jj_gen;
;
}
correlationName = identifier(Limits.MAX_IDENTIFIER_LENGTH, true);
switch (jj_nt.kind) {
case LEFT_PAREN:
jj_consume_token(LEFT_PAREN);
derivedRCL = derivedColumnList();
jj_consume_token(RIGHT_PAREN);
break;
default:
jj_la1[195] = jj_gen;
;
}
switch (jj_nt.kind) {
case DERBYDASHPROPERTIES:
optionalTableClauses = optionalTableProperties();
break;
default:
jj_la1[196] = jj_gen;
;
}
fromTable = (FromTable) nodeFactory.getNode(
C_NodeTypes.FROM_SUBQUERY,
derivedTable.getResultSet(),
derivedTable.getOrderByList(),
derivedTable.getOffset(),
derivedTable.getFetchFirst(),
correlationName,
derivedRCL,
((optionalTableClauses != null) ?
(Properties) optionalTableClauses[OPTIONAL_TABLE_CLAUSES_TABLE_PROPERTIES] :
(Properties) null),