metaEventOperation.checkAndGetFields(table, selectItem);
// Parse The WHERE clause
SQLExpr where = sqlSelectQueryBlock.getWhere();
LOG.debug("SELECT SQL:where " + where);
QueryInfo actionInfo = parseWhereClause(table, metaEventOperation, where, sqlSelectQueryBlock.isForUpdate());
LOG.debug("ActionInfo " + actionInfo.toString());
// Parse The Limit clause
SQLExpr rowCount = null;
if (sqlSelectQueryBlock.getLimit() != null) {
rowCount = sqlSelectQueryBlock.getLimit().getRowCount();
}
int limit = -1;
if (rowCount != null) {
limit = convertToInt(rowCount);
}
// Convert to QueryPlan
if(aggregateInfo == null) {
convertToQueryPlan(table, context, actionInfo, metaEventOperation,
selectItem, limit);
} else {
actionInfo.setType(QueryInfo.QueryType.AGGREGATE);
actionInfo.setAggregateInfo(aggregateInfo);
convertToQueryPlan(table, context, actionInfo, metaEventOperation);
}
} else if (sqlSelectQuery instanceof SQLUnionQuery) {
throw new UnsupportedException("Union clause Unsupported");
}