Package org.teiid.core

Examples of org.teiid.core.TeiidRuntimeException


            resolveSubQuery(obj, externalGroups);
            discoveredGroup(obj.getGroupSymbol());
            try {
                ResolverUtil.addTempGroup(metadata, obj.getGroupSymbol(), obj.getCommand().getProjectedSymbols(), false);
            } catch (QueryResolverException err) {
                throw new TeiidRuntimeException(err);
            }
            obj.getGroupSymbol().setMetadataID(metadata.getMetadataStore().getTempGroupID(obj.getGroupSymbol().getName()));
        }
View Full Code Here


              discoveredGroup(group);
              if (group.isProcedure()) {
                  createProcRelational(obj);
              }
            } catch(TeiidException e) {
                throw new TeiidRuntimeException(e);                       
      }
        }
View Full Code Here

      for (GroupSymbol group : discoveredGroups) {
        if (!this.currentGroups.add(group)) {
                  String msg = QueryPlugin.Util.getString("ERR.015.008.0046", group.getName()); //$NON-NLS-1$
                  QueryResolverException qre = new QueryResolverException("ERR.015.008.0046", msg); //$NON-NLS-1$
                  qre.addUnresolvedSymbol(new UnresolvedSymbolDescription(group.toString(), msg));
                  throw new TeiidRuntimeException(qre);
              }
      }
            discoveredGroups.clear();
    }
View Full Code Here

                }
               
                try {
                    symbol = new ExpressionSymbol(originalSymbol.getShortName(), ResolverUtil.convertExpression(expr, DataTypeManager.getDataTypeName(type), metadata));
                } catch (QueryResolverException err) {
                    throw new TeiidRuntimeException(err);
                }
               
                if (!(originalSymbol instanceof ExpressionSymbol)) {
                    symbol = new AliasSymbol(originalSymbol.getShortName(), symbol);
                }
View Full Code Here

 
    static Command helpTestRewriteCommand(String original, String expected) {
        try {
            return helpTestRewriteCommand(original, expected, FakeMetadataFactory.example1Cached());
        } catch(TeiidException e) {
            throw new TeiidRuntimeException(e);
        }
    }
View Full Code Here

          RelationalPlanner planner = new RelationalPlanner();
          planner.initialize(command, idGenerator, metadata, capFinder, analysisRecord, context);
          result = planner.optimize(command);
        }
      } catch (QueryResolverException e) {
        throw new TeiidRuntimeException(e);
      }
        }
   
    if(debug) {
            analysisRecord.println("\n----------------------------------------------------------------------------"); //$NON-NLS-1$
View Full Code Here

        query.setSelect(innerSelect);
        Query outerQuery = null;
        try {
            outerQuery = QueryRewriter.createInlineViewQuery(new GroupSymbol("X"), query, metadata, query.getSelect().getProjectedSymbols()); //$NON-NLS-1$
        } catch (TeiidException err) {
            throw new TeiidRuntimeException(err);
        }
        Iterator<SingleElementSymbol> iter = outerQuery.getSelect().getProjectedSymbols().iterator();
        HashMap<Expression, SingleElementSymbol> expressionMap = new HashMap<Expression, SingleElementSymbol>();
        for (SingleElementSymbol symbol : query.getSelect().getProjectedSymbols()) {
            expressionMap.put(SymbolMap.getExpression(symbol), iter.next());
View Full Code Here

            @Override
            public Expression replaceExpression(Expression element) {
                try {
                    return rewriteExpressionDirect(element);
                } catch (TeiidException err) {
                    throw new TeiidRuntimeException(err);
                }
            }
        };
        try {
            PostOrderNavigator.doVisit(obj, visitor);
View Full Code Here

            expressionMap.put(new ElementSymbol(symbol.getName()), ses);
        }
        ExpressionMappingVisitor.mapExpressions(orderBy, expressionMap);
        //now the order by should only contain element symbols
    } catch (TeiidException err) {
            throw new TeiidRuntimeException(err);
        }
    List symbols = top.getSelect().getSymbols();
    top.getSelect().setSymbols(symbols.subList(0, originalSymbolCount));
    top.setInto(into);
    top.setLimit(limit);
View Full Code Here

    }
    if (needsView) {
        try {
        insert.setQueryExpression(createInlineViewQuery(new GroupSymbol("X"), insert.getQueryExpression(), metadata, insert.getVariables())); //$NON-NLS-1$
      } catch (TeiidException err) {
              throw new TeiidRuntimeException(err);
          }
    }
    return insert;
  }
View Full Code Here

TOP

Related Classes of org.teiid.core.TeiidRuntimeException

Copyright © 2018 www.massapicom. 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.