use of org.hsqldb_voltpatches.VoltXMLElement in project voltdb by VoltDB.
the class ParsedUnionStmt method parse.
@Override
void parse(VoltXMLElement stmtNode) {
String type = stmtNode.attributes.get("uniontype");
// Set operation type
m_unionType = UnionType.valueOf(type);
int idx = 0;
VoltXMLElement limitElement = null, offsetElement = null, orderbyElement = null;
for (VoltXMLElement child : stmtNode.children) {
if (SELECT_NODE_NAME.equals(child.name) || UNION_NODE_NAME.equals(child.name)) {
assert (idx < m_children.size());
AbstractParsedStmt nextStmt = m_children.get(idx++);
nextStmt.parse(child);
} else if (child.name.equals("limit")) {
limitElement = child;
} else if (child.name.equals("offset")) {
offsetElement = child;
} else if (child.name.equals("ordercolumns")) {
orderbyElement = child;
}
}
// Parse LIMIT/OFFSET
ParsedSelectStmt.parseLimitAndOffset(limitElement, offsetElement, m_limitOffset);
// Parse ORDER BY
if (orderbyElement != null) {
parseOrderColumns(orderbyElement);
placeTVEsForOrderby();
}
// prepare the limit plan node if it needs one.
if (hasLimitOrOffset()) {
ParsedSelectStmt.prepareLimitPlanNode(this, m_limitOffset);
}
}
use of org.hsqldb_voltpatches.VoltXMLElement in project voltdb by VoltDB.
the class TestVoltXMLElement method makeNamedElement.
VoltXMLElement makeNamedElement(String elementName, String attName) {
VoltXMLElement e = new VoltXMLElement(elementName);
e.attributes.put("name", attName);
return e;
}
Aggregations