Package org.teiid.query.tempdata

Examples of org.teiid.query.tempdata.TempTableStore


     * @see ProcessorPlan#connectDataManager(ProcessorDataManager)
     */
    public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) {
      if (this.with != null) {
        context = context.clone();
        tempTableStore = new TempTableStore(context.getConnectionID());
            tempTableStore.setParentTempTableStore(context.getTempTableStore());
            context.setTempTableStore(tempTableStore);
        for (WithQueryCommand withCommand : this.with) {
          withCommand.getCommand().getProcessorPlan().initialize(context, dataMgr, bufferMgr);
      }
View Full Code Here


          if (preparedSql == null) {
            throw e;
          }
        }
       
        TempTableStore tempTableStore = null;
        if(requestManager != null) {
            if (workItem != null) {
                ClientState state = requestManager.getClientState(workContext.getSessionId(), false);
                if (state != null) {
                  tempTableStore = state.sessionTables;
                }
            }
        }
        if(tempTableStore != null) {
            metadata = new TempMetadataAdapter(this.metadata, tempTableStore.getMetadataStore());
        }
       
        if(workItem != null) {
          return getMetadataForCommand(workItem.getOriginalCommand());
        }
View Full Code Here

              String state = null;
              Timestamp updated = null;
              Integer cardinaltity = null;
              Boolean valid = null;
              if (table.getMaterializedTable() == null) {
                TempTableStore globalStore = context.getGlobalTableStore();
                matTableName = RelationalPlanner.MAT_PREFIX+table.getFullName().toUpperCase();
                MatTableInfo info = globalStore.getMatTableInfo(matTableName);
                valid = info.isValid();
                state = info.getState().name();
                updated = info.getUpdateTime()==-1?null:new Timestamp(info.getUpdateTime());
                TempMetadataID id = globalStore.getMetadataStore().getTempGroupID(matTableName);
                if (id != null) {
                  cardinaltity = id.getCardinality();
                }
                //ttl, pref_mem - not part of proper metadata
              } else {
View Full Code Here

    if (this.objectsAccessed != null) {
      return;
    }
    VDBMetaData vdb = DQPWorkContext.getWorkContext().getVDB();
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    TempTableStore globalStore = vdb.getAttachment(TempTableStore.class);
    if (!externalNames.isEmpty()) {
      this.objectsAccessed = new HashSet<Object>(externalNames.size());
      for (List<String> key : this.externalNames) {
        if (key.size() == 1) {
          String matTableName = key.get(0);
          TempMetadataID id = globalStore.getMetadataStore().getTempGroupID(matTableName);
          if (id == null) {
            //if the id is null, then create a local instance
            String viewFullName = matTableName.substring(RelationalPlanner.MAT_PREFIX.length());
            id = globalStore.getGlobalTempTableMetadataId(tm.getGroupID(viewFullName), tm);
          }
          this.objectsAccessed.add(id);
        } else {
          Schema s = tm.getMetadataStore().getSchema(key.get(0).toUpperCase());
          Modifiable m = s.getTables().get(key.get(1).toUpperCase());
View Full Code Here

      if (key == null) {
        return null;
      }
    ClientState state = clientState.get(key);
    if (state == null && create) {
      state = new ClientState(new TempTableStore(key));
        clientState.put(key, state);
    }
    return state;
    }
View Full Code Here

TOP

Related Classes of org.teiid.query.tempdata.TempTableStore

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.