Package org.teiid.query.tempdata

Examples of org.teiid.query.tempdata.TempTableStore


          context.setBufferManager(bm);
          bufferMgr = bm;
      }
      context.getNextRand(0);
        if (context.getTempTableStore() == null) {
          context.setTempTableStore(new TempTableStore(context.getConnectionID()));
        }
        if (context.getGlobalTableStore() == null) {
          context.setGlobalTableStore(new TempTableStore("SYSTEM"));
        }
        if (!(dataManager instanceof TempTableDataManager)) {
          SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>();
          cache.setBufferManager(bufferMgr);
          Executor executor = new Executor() {
View Full Code Here


 
  void update() {
    TransformationMetadata metadata = buildTransformationMetaData(mergedVDB, getVisibilityMap(), getMetadataStores(), getUDF(), systemFunctions, this.additionalStores);
    mergedVDB.addAttchment(QueryMetadataInterface.class, metadata);
    mergedVDB.addAttchment(TransformationMetadata.class, metadata)
    TempTableStore globalTables = new TempTableStore("SYSTEM"); //$NON-NLS-1$
    mergedVDB.addAttchment(TempTableStore.class, globalTables);
  }
View Full Code Here

      String viewName, List<?> tuple, boolean delete) {
    VDBMetaData vdb = this.vdbRepository.getVDB(vdbName, vdbVersion);
    if (vdb == null) {
      return;
    }
    TempTableStore globalStore = vdb.getAttachment(TempTableStore.class);
    if (globalStore == null) {
      return;
    }
    try {
      this.dqpCore.getDataTierManager().updateMatViewRow(globalStore, RelationalPlanner.MAT_PREFIX + (schema + '.' + viewName).toUpperCase(), tuple, delete);
View Full Code Here

    TestProcessor.doProcess(processorPlan, dataManager, expectedResults, cc);
    assertTrue(Determinism.SESSION_DETERMINISTIC.compareTo(cc.getDeterminismLevel()) <= 0);
  }

  @Before public void setUp() {
    tempStore = new TempTableStore("1"); //$NON-NLS-1$
    metadata = new TempMetadataAdapter(FakeMetadataFactory.example1Cached(), tempStore.getMetadataStore());
    metadata.setSession(true);
    FakeDataManager fdm = new FakeDataManager();
      TestProcessor.sampleData1(fdm);
      BufferManager bm = BufferManagerFactory.getStandaloneBufferManager();
View Full Code Here

  private TempTableStore globalStore;
  private ProcessorPlan previousPlan;
  private HardcodedDataManager hdm;
 
  @Before public void setUp() {
    tempStore = new TempTableStore("1"); //$NON-NLS-1$
    globalStore  = new TempTableStore("SYSTEM");
    metadata = new TempMetadataAdapter(RealMetadataFactory.exampleMaterializedView(), tempStore.getMetadataStore());
    hdm = new HardcodedDataManager();
    hdm.addData("SELECT matsrc.x FROM matsrc", new List[] {Arrays.asList((String)null), Arrays.asList("one"), Arrays.asList("two"), Arrays.asList("three")});
    hdm.addData("SELECT mattable.info.e1, mattable.info.e2 FROM mattable.info", new List[] {Arrays.asList("a", 1), Arrays.asList("a", 2)});
    hdm.addData("SELECT mattable.info.e2, mattable.info.e1 FROM mattable.info", new List[] {Arrays.asList(1, "a"), Arrays.asList(2, "a")});
View Full Code Here

        QueryMetadataInterface metadata = RealMetadataFactory.exampleMaterializedView();
        AnalysisRecord analysis = new AnalysisRecord(true, DEBUG);
       
        Command command = helpGetCommand(userSql, metadata, null);
        CommandContext cc = new CommandContext();
        cc.setGlobalTableStore(new TempTableStore("SYSTEM"));
        ProcessorPlan plan = TestOptimizer.getPlan(command, metadata, getGenericFinder(), analysis, true, cc);
        TestOptimizer.checkAtomicQueries(new String[] {"SELECT #MAT_MATVIEW.VGROUP2.x FROM #MAT_MATVIEW.VGROUP2"}, plan);
        Collection<Annotation> annotations = analysis.getAnnotations();
        assertNotNull("Expected annotations but got none", annotations); //$NON-NLS-1$
        assertEquals("Expected one annotation", 1, annotations.size()); //$NON-NLS-1$
View Full Code Here

        QueryMetadataInterface metadata = RealMetadataFactory.exampleMaterializedView();
        AnalysisRecord analysis = new AnalysisRecord(true, DEBUG);
       
        Command command = helpGetCommand(userSql, metadata, null);
        CommandContext cc = new CommandContext();
        cc.setGlobalTableStore(new TempTableStore("SYSTEM"));
        RelationalPlan plan = (RelationalPlan)TestOptimizer.getPlan(command, metadata, getGenericFinder(), analysis, true, cc);
        assertEquals(1f, plan.getRootNode().getEstimateNodeCardinality());
        TestOptimizer.checkAtomicQueries(new String[] {"SELECT #MAT_MATVIEW.VGROUP3.x, #MAT_MATVIEW.VGROUP3.y FROM #MAT_MATVIEW.VGROUP3 WHERE #MAT_MATVIEW.VGROUP3.x = 'foo'"}, plan);
        Collection<Annotation> annotations = analysis.getAnnotations();
        assertNotNull("Expected annotations but got none", annotations); //$NON-NLS-1$
View Full Code Here

        QueryMetadataInterface metadata = RealMetadataFactory.exampleMaterializedView();
        AnalysisRecord analysis = new AnalysisRecord(true, DEBUG);
       
        Command command = helpGetCommand(userSql, metadata, null);
        CommandContext cc = new CommandContext();
        cc.setGlobalTableStore(new TempTableStore("SYSTEM"));
        ProcessorPlan plan = TestOptimizer.getPlan(command, metadata, getGenericFinder(), analysis, true, cc);
        TestOptimizer.checkAtomicQueries(new String[] {"SELECT #MAT_MATVIEW.VGROUP4.x FROM #MAT_MATVIEW.VGROUP4"}, plan);
        Collection<Annotation> annotations = analysis.getAnnotations();
        assertNotNull("Expected annotations but got none", annotations); //$NON-NLS-1$
        assertEquals("Expected one annotation", 2, annotations.size()); //$NON-NLS-1$
View Full Code Here

     * @see ProcessorPlan#initialize(ProcessorDataManager, Object)
     */
    public void initialize(CommandContext context, ProcessorDataManager dataMgr, BufferManager bufferMgr) {
      context = context.clone();
      setContext(context);
        TempTableStore tempTableStore = new TempTableStore(context.getConnectionID());
        tempTableStore.setParentTempTableStore(context.getTempTableStore());
        context.setTempTableStore(tempTableStore);
        this.dataMgr = dataMgr;
        this.bufferMgr = bufferMgr;
        this.env.initialize(context, this.dataMgr, this.bufferMgr);
    }
View Full Code Here

                VariableContext context = getCurrentVariableContext();
                Object value = this.evaluateExpression(entry.getValue());
                context.setValue(entry.getKey(), value);
        }
        }
        tempTableStore = new TempTableStore(getContext().getConnectionID());
        getContext().setTempTableStore(tempTableStore);
      }
      this.evaluatedParams = true;
    }
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.