if (eventType.equals(XMLEvent.START_ELEMENT)) {
String name = reader.getLocalName();
if ("query".equalsIgnoreCase(name)) {
String id = reader.getAttributeValue(null, "id");
String parent = reader.getAttributeValue(null, "parent");
Query query = readQuery(reader);
if (query != null) {
idMap.put(Integer.parseInt(id), query);
if (parent != null) {
int parentId = Integer.parseInt(parent);
Query parentQuery = idMap.get(parentId);
//A plugin filter may be missing, or the parent filter could not be deserialized.
//For example a partition filter, which depends on partitions, and partitions are not serialized
if (parentQuery != null) {
model.setSubQuery(parentQuery, query);