Search in sources :

Example 1 with PlanNode

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

the class TextTableNode 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 2 with PlanNode

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

the class WindowFunctionProjectNode method getDescriptionProperties.

@Override
public PlanNode getDescriptionProperties() {
    PlanNode props = super.getDescriptionProperties();
    AnalysisRecord.addLanaguageObjects(props, PROP_WINDOW_FUNCTIONS, this.windows.keySet());
    return props;
}
Also used : PlanNode(org.teiid.client.plan.PlanNode)

Example 3 with PlanNode

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

the class XMLTableNode method getDescriptionProperties.

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

Example 4 with PlanNode

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

the class BatchedUpdateNode method getDescriptionProperties.

@Override
public PlanNode getDescriptionProperties() {
    PlanNode node = super.getDescriptionProperties();
    AnalysisRecord.addLanaguageObjects(node, AnalysisRecord.PROP_SQL, this.updateCommands);
    return node;
}
Also used : PlanNode(org.teiid.client.plan.PlanNode)

Example 5 with PlanNode

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

the class GroupingNode method getDescriptionProperties.

public PlanNode getDescriptionProperties() {
    // Default implementation - should be overridden
    PlanNode props = super.getDescriptionProperties();
    if (orderBy != null) {
        int elements = orderBy.size();
        List<String> groupCols = new ArrayList<String>(elements);
        for (int i = 0; i < elements; i++) {
            groupCols.add(this.orderBy.get(i).toString());
        }
        props.addProperty(PROP_GROUP_COLS, groupCols);
    }
    if (outputMapping != null) {
        List<String> groupCols = new ArrayList<String>(outputMapping.asMap().size());
        for (Map.Entry<ElementSymbol, Expression> entry : outputMapping.asMap().entrySet()) {
            groupCols.add(entry.toString());
        }
        props.addProperty(PROP_GROUP_MAPPING, groupCols);
    }
    props.addProperty(PROP_SORT_MODE, String.valueOf(this.removeDuplicates));
    if (rollup) {
        props.addProperty(PROP_ROLLUP, Boolean.TRUE.toString());
    }
    return props;
}
Also used : ElementSymbol(org.teiid.query.sql.symbol.ElementSymbol) PlanNode(org.teiid.client.plan.PlanNode) Expression(org.teiid.query.sql.symbol.Expression) ArrayList(java.util.ArrayList) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map) SymbolMap(org.teiid.query.sql.util.SymbolMap)

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