Examples of AliasSymbol


Examples of com.odiago.flumebase.exec.AliasSymbol

      sym.setParentName(streamAlias);
      nextId++;
      outTable.addSymbol(sym);

      // And also as an alias of just the fieldName.
      outTable.addSymbol(new AliasSymbol(fieldName, sym));
    }

    nextFieldId.item = Integer.valueOf(nextId);
    mSymbols = outTable;
    return outTable;
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

  private void updateSymbolName(List<SingleElementSymbol> projectCols, int i,
      ElementSymbol virtualElem, SingleElementSymbol projectedSymbol) {
    if (projectedSymbol instanceof AliasSymbol) {
      ((AliasSymbol)projectedSymbol).setShortName(virtualElem.getShortCanonicalName());
    } else {
      projectCols.set(i, new AliasSymbol(virtualElem.getShortCanonicalName(), projectedSymbol));
    }
  }
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

                        SingleElementSymbol oldSes = oldProjectSymbols.get(i);
                        if (newSes instanceof ExpressionSymbol || !newSes.getShortCanonicalName().equals(oldSes.getShortCanonicalName())) {
                            if (newSes instanceof AliasSymbol) {
                                newSes = ((AliasSymbol)newSes).getSymbol();
                            }
                            newProjectSymbols.set(i, new AliasSymbol(oldSes.getShortName(), newSes));
                        }
                    }
                   
                    PlanNode sort = NodeEditor.findParent(firstProject, NodeConstants.Types.SORT, NodeConstants.Types.SOURCE);
                   
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

             
              if (metadataParameter.getParameterType()==ParameterInfo.INOUT) {
                  aliasName += "_IN"; //$NON-NLS-1$
              }
             
              SingleElementSymbol newSymbol = new AliasSymbol(aliasName, new ExpressionSymbol(paramSymbol.getShortName(), ref));
             
              select.addSymbol(newSymbol);
              accessPatternElementNames.add(queryName + ElementSymbol.SEPARATOR + aliasName);
          }
      }
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

                } catch (QueryResolverException err) {
                    throw new TeiidRuntimeException(err);
                }
               
                if (!(originalSymbol instanceof ExpressionSymbol)) {
                    symbol = new AliasSymbol(originalSymbol.getShortName(), symbol);
                }
            }
            newProject.add(symbol);
        }
        return newProject;
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

    @Override
    public void visit( OrderByItem obj ) {
        SingleElementSymbol ses = obj.getSymbol();
        if (ses instanceof AliasSymbol) {
            AliasSymbol as = (AliasSymbol)ses;
            outputDisplayName(as.getOutputName());
        } else {
            visitNode(ses);
        }
        if (!obj.isAscending()) {
            append(SPACE);
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

                newSymbol = (SingleElementSymbol)expr;
            }
                       
            symbols.put(symbol, newAlias);
            if (visitor.namingContext.aliasColumns && needsAlias) {
                newSymbol = new AliasSymbol(symbol.getShortName(), newSymbol);
                newSymbol.setOutputName(newAlias);
            }
            selectSymbols.set(i, newSymbol);
        }
       
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

              } else if (expr instanceof ElementSymbol) {
                needsAlias &= needsAlias(name, (ElementSymbol)expr);
              }
                         
              if (needsAlias) {
                  element = new AliasSymbol(element.getShortName(), (SingleElementSymbol)expr);
              } else if (expr instanceof ElementSymbol) {
                element = (ElementSymbol)expr;
                visitNode(element);
              }
              item.setSymbol(element);
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

              }
              ElementSymbol es = (ElementSymbol)ses;
              if (!useName) {
                bindings.add(sourceNode.getMappedSymbol(es).toString());
              } else {
                bindings.add(new AliasSymbol(name, sourceNode.getMappedSymbol(es)).toString());
              }
            }
            modifiedNode.setBindings(bindings);
        }
    }
View Full Code Here

Examples of org.teiid.query.sql.symbol.AliasSymbol

           
            if (projectedSymbols.contains(symbol)) {
                mappedElements.put(symbol, new ElementSymbol(groupName + ElementSymbol.SEPARATOR + symbol.getShortName()));
                continue;
            }
            AliasSymbol alias = getMachingAlias(projectedSymbols, symbol);
            if (alias != null) {
                mappedElements.put(symbol, new ElementSymbol(groupName + ElementSymbol.SEPARATOR + alias.getShortName()));
                continue;
            }
            // this means that the criteria symbol, is not projected, so add the element symbol
            // to query node, so that it is projected.
           
            String name = getNewSymbolName(newGroupSymbol.getName(), symbol, symbolMap);
           
            AliasSymbol selectSymbol = new AliasSymbol(name, symbol);
           
            transformationQuery.getSelect().addSymbol(selectSymbol);
            addedProjectedSymbol = true;

            // also add to the projected elements on the temp group.
            metadata.getMetadataStore().addElementSymbolToTempGroup(newGroupSymbol.getName(), selectSymbol);
           
            ElementSymbol upperSymbol = new ElementSymbol(groupName + ElementSymbol.SEPARATOR + selectSymbol.getShortName());
            mappedElements.put(symbol, upperSymbol);
           
            //add to the symbol map.  the base symbol is not to the original group, since it doesn't really project this element
            symbolMap.put(upperSymbol, upperSymbol);
        }     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.