Search in sources :

Example 26 with PlanNode

use of org.teiid.client.plan.PlanNode in project teiid by teiid.

the class AccessNode method getDescriptionProperties.

public synchronized PlanNode getDescriptionProperties() {
    if (getChildCount() > 0) {
        return this.getChildren()[0].getDescriptionProperties();
    }
    PlanNode props = super.getDescriptionProperties();
    props.addProperty(PROP_SQL, this.command.toString());
    props.addProperty(PROP_MODEL_NAME, this.modelName);
    Collection<? extends SubqueryContainer<?>> objects = getObjects();
    if (!objects.isEmpty()) {
        int index = 0;
        for (Iterator<? extends SubqueryContainer<?>> iterator = objects.iterator(); iterator.hasNext(); ) {
            SubqueryContainer<?> subqueryContainer = iterator.next();
            // $NON-NLS-1$
            props.addProperty(PROP_SQL + " Subplan " + index++, subqueryContainer.getCommand().getProcessorPlan().getDescriptionProperties());
        }
    }
    if (this.projection != null && this.projection.length > 0 && this.originalSelect != null) {
        props.addProperty(PROP_SELECT_COLS, this.originalSelect.toString());
    }
    if (this.info != null) {
        props.addProperty(PROP_SHARING_ID, String.valueOf(this.info.id));
    }
    if (this.subPlans != null) {
        for (Map.Entry<GroupSymbol, RelationalPlan> entry : this.subPlans.entrySet()) {
            // $NON-NLS-1$
            props.addProperty(entry.getKey() + " Dependent Subplan", entry.getValue().getDescriptionProperties());
        }
    }
    return props;
}
Also used : PlanNode(org.teiid.client.plan.PlanNode) GroupSymbol(org.teiid.query.sql.symbol.GroupSymbol) SymbolMap(org.teiid.query.sql.util.SymbolMap)

Example 27 with PlanNode

use of org.teiid.client.plan.PlanNode in project teiid by teiid.

the class ArrayTableNode method getDescriptionProperties.

@Override
public PlanNode getDescriptionProperties() {
    PlanNode props = super.getDescriptionProperties();
    AnalysisRecord.addLanaguageObjects(props, AnalysisRecord.PROP_TABLE_FUNCTION, Arrays.asList(this.table));
    return props;
}
Also used : PlanNode(org.teiid.client.plan.PlanNode)

Example 28 with PlanNode

use of org.teiid.client.plan.PlanNode in project teiid by teiid.

the class ObjectTableNode method getDescriptionProperties.

@Override
public PlanNode getDescriptionProperties() {
    PlanNode props = super.getDescriptionProperties();
    AnalysisRecord.addLanaguageObjects(props, AnalysisRecord.PROP_TABLE_FUNCTION, Arrays.asList(this.table));
    return props;
}
Also used : PlanNode(org.teiid.client.plan.PlanNode)

Example 29 with PlanNode

use of org.teiid.client.plan.PlanNode in project teiid by teiid.

the class ProjectIntoNode method getDescriptionProperties.

public PlanNode getDescriptionProperties() {
    PlanNode props = super.getDescriptionProperties();
    props.addProperty(PROP_INTO_GROUP, intoGroup.toString());
    if (upsert) {
        // $NON-NLS-1$
        props.addProperty(PROP_UPSERT, "true");
    }
    List<String> selectCols = new ArrayList<String>(intoElements.size());
    for (int i = 0; i < this.intoElements.size(); i++) {
        selectCols.add(this.intoElements.get(i).toString());
    }
    props.addProperty(PROP_SELECT_COLS, selectCols);
    return props;
}
Also used : PlanNode(org.teiid.client.plan.PlanNode) ArrayList(java.util.ArrayList) SourceHint(org.teiid.query.sql.lang.SourceHint)

Example 30 with PlanNode

use of org.teiid.client.plan.PlanNode in project teiid by teiid.

the class JoinNode method getDescriptionProperties.

/**
 * @see org.teiid.query.processor.relational.RelationalNode#getDescriptionProperties()
 * @since 4.2
 */
public PlanNode getDescriptionProperties() {
    // Default implementation - should be overridden
    PlanNode props = super.getDescriptionProperties();
    if (isDependent()) {
        props.addProperty(PROP_DEPENDENT, Boolean.TRUE.toString());
    }
    props.addProperty(PROP_JOIN_STRATEGY, this.joinStrategy.toString());
    props.addProperty(PROP_JOIN_TYPE, this.joinType.toString());
    List<String> critList = getCriteriaList();
    props.addProperty(PROP_JOIN_CRITERIA, critList);
    return props;
}
Also used : PlanNode(org.teiid.client.plan.PlanNode)

Aggregations

PlanNode (org.teiid.client.plan.PlanNode)35 ArrayList (java.util.ArrayList)3 Test (org.junit.Test)3 SymbolMap (org.teiid.query.sql.util.SymbolMap)3 ResultSet (java.sql.ResultSet)2 Statement (java.sql.Statement)2 Property (org.teiid.client.plan.PlanNode.Property)2 ElementSymbol (org.teiid.query.sql.symbol.ElementSymbol)2 BigInteger (java.math.BigInteger)1 SQLXML (java.sql.SQLXML)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Map (java.util.Map)1 RequestMessage (org.teiid.client.RequestMessage)1 ResultsMessage (org.teiid.client.ResultsMessage)1 ParameterInfo (org.teiid.client.metadata.ParameterInfo)1 Annotation (org.teiid.client.plan.Annotation)1 SQLXMLImpl (org.teiid.core.types.SQLXMLImpl)1 AtomicRequestMessage (org.teiid.dqp.message.AtomicRequestMessage)1