projectNode.addChild(batchNode);
projectNode.addChild(batchNode);
projectNode.addChild(batchNode);
private RelationalNode correctProjectionInternalTables(PlanNode node, AccessNode aNode) throws QueryMetadataException, TeiidComponentException { if (node.getGroups().size() != 1) { return aNode; } GroupSymbol group = node.getGroups().iterator().next(); if (!CoreConstants.SYSTEM_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID()))) && !CoreConstants.SYSTEM_ADMIN_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID())))) { return aNode; } List projectSymbols = (List) node.getProperty(NodeConstants.Info.OUTPUT_COLS); List<ElementSymbol> acutalColumns = ResolverUtil.resolveElementsInGroup(group, metadata); if (projectSymbols.equals(acutalColumns)) { return aNode; } node.setProperty(NodeConstants.Info.OUTPUT_COLS, acutalColumns); if (node.getParent() != null && node.getParent().getType() == NodeConstants.Types.PROJECT) { //if the parent is already a project, just correcting the output cols is enough return aNode; } ProjectNode pnode = new ProjectNode(getID()); pnode.setSelectSymbols(projectSymbols); aNode = (AccessNode)prepareToAdd(node, aNode); node.setProperty(NodeConstants.Info.OUTPUT_COLS, projectSymbols); pnode.addChild(aNode); return pnode; }
private RelationalNode correctProjectionInternalTables(PlanNode node, AccessNode aNode) throws QueryMetadataException, TeiidComponentException { if (node.getGroups().size() != 1) { return aNode; } GroupSymbol group = node.getGroups().iterator().next(); if (!CoreConstants.SYSTEM_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID()))) && !CoreConstants.SYSTEM_ADMIN_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID())))) { return aNode; } List projectSymbols = (List) node.getProperty(NodeConstants.Info.OUTPUT_COLS); List<ElementSymbol> acutalColumns = ResolverUtil.resolveElementsInGroup(group, metadata); if (projectSymbols.equals(acutalColumns)) { return aNode; } node.setProperty(NodeConstants.Info.OUTPUT_COLS, acutalColumns); if (node.getParent() != null && node.getParent().getType() == NodeConstants.Types.PROJECT) { //if the parent is already a project, just correcting the output cols is enough return aNode; } ProjectNode pnode = new ProjectNode(getID()); pnode.setSelectSymbols(projectSymbols); aNode = (AccessNode)prepareToAdd(node, aNode); node.setProperty(NodeConstants.Info.OUTPUT_COLS, projectSymbols); pnode.addChild(aNode); return pnode; }
private RelationalNode correctProjectionInternalTables(PlanNode node, AccessNode aNode) throws QueryMetadataException, TeiidComponentException { if (node.getGroups().size() != 1) { return aNode; } GroupSymbol group = node.getGroups().iterator().next(); if (!CoreConstants.SYSTEM_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID()))) && !CoreConstants.SYSTEM_ADMIN_MODEL.equals(metadata.getFullName(metadata.getModelID(group.getMetadataID())))) { return aNode; } List projectSymbols = (List) node.getProperty(NodeConstants.Info.OUTPUT_COLS); List<ElementSymbol> acutalColumns = ResolverUtil.resolveElementsInGroup(group, metadata); if (projectSymbols.equals(acutalColumns)) { return aNode; } node.setProperty(NodeConstants.Info.OUTPUT_COLS, acutalColumns); if (node.getParent() != null && node.getParent().getType() == NodeConstants.Types.PROJECT) { //if the parent is already a project, just correcting the output cols is enough return aNode; } ProjectNode pnode = new ProjectNode(getID()); pnode.setSelectSymbols(projectSymbols); aNode = (AccessNode)prepareToAdd(node, aNode); node.setProperty(NodeConstants.Info.OUTPUT_COLS, projectSymbols); pnode.addChild(aNode); return pnode; }
projectNode.setElements(outputElements); projectNode.setSelectSymbols(outputElements); projectNode.addChild(groupNode);
projectNode.setElements(outputElements); projectNode.setSelectSymbols(outputElements); projectNode.addChild(groupNode);
projectNode.setElements(outputElements); projectNode.setSelectSymbols(outputElements); projectNode.addChild(groupNode);
public ProjectNode helpSetupProject(List elements, List[] data, List childElements, ProcessorDataManager dataMgr) { BufferManager mgr = BufferManagerFactory.getStandaloneBufferManager(); CommandContext context = new CommandContext("pid", "test", null, null, 1); //$NON-NLS-1$ //$NON-NLS-2$ FakeRelationalNode dataNode = new FakeRelationalNode(2, data); dataNode.setElements(childElements); dataNode.initialize(context, mgr, null); ProjectNode projectNode = new ProjectNode(1); projectNode.setSelectSymbols(elements); projectNode.setElements(elements); projectNode.addChild(dataNode); projectNode.initialize(context, mgr, dataMgr); return projectNode; }
pnode.addChild(wfpn); for (WindowFunction wf : windowFunctions) { validateAggregateFunctionEvaluation(wf.getFunction());
pnode.addChild(wfpn); for (WindowFunction wf : windowFunctions) { validateAggregateFunctionEvaluation(wf.getFunction());
pnode.addChild(wfpn); for (WindowFunction wf : windowFunctions) { validateAggregateFunctionEvaluation(wf.getFunction());