Package org.teiid.query.metadata

Examples of org.teiid.query.metadata.TransformationMetadata$LiveQueryNode


    }
    this.mergedVDB = null;
 
 
  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


          udfs.add(new FunctionTree(schema.getName(), new UDFSource(schema.getFunctions().values()), true));
        }
      }
    }
   
    TransformationMetadata metadata =  new TransformationMetadata(vdb, compositeStore, visibilityMap, systemFunctions, udfs);
       
    return metadata;
  }
View Full Code Here

        caps.setSourceProperty(Capability.MAX_IN_CRITERIA_SIZE, new Integer(1000));
        caps.setFunctionSupport("||", true); //$NON-NLS-1$
        capFinder.addCapabilities("BQT1", caps); //$NON-NLS-1$
        capFinder.addCapabilities("BQT2", caps); //$NON-NLS-1$

        TransformationMetadata metadata = FakeMetadataFactory.exampleBQT();
        FakeMetadataFactory.setCardinality("bqt1.smalla", RuleChooseDependent.DEFAULT_INDEPENDENT_CARDINALITY + 1000, metadata); //$NON-NLS-1$
        FakeMetadataFactory.setCardinality("bqt2.smalla", RuleChooseDependent.DEFAULT_INDEPENDENT_CARDINALITY - 1, metadata); //$NON-NLS-1$
        
        ProcessorPlan plan = TestOptimizer.helpPlan(
            "SELECT table1comp.IntKey, table1comp.key1, BQT1.SmallA.StringKey FROM (SELECT t1.*, (STRINGKEY || STRINGNUM) AS key1 FROM BQT2.SmallA AS t1) AS table1comp, BQT1.SmallA WHERE table1comp.key1 = BQT1.SmallA.StringKey AND table1comp.key1 = BQT1.SmallA.StringNum"//$NON-NLS-1$
View Full Code Here

        caps.setCapabilitySupport(Capability.QUERY_AGGREGATES_MAX, true);
        caps.setCapabilitySupport(Capability.QUERY_GROUP_BY, true);
        capFinder.addCapabilities("BQT1", caps); //$NON-NLS-1$
        capFinder.addCapabilities("BQT2", caps); //$NON-NLS-1$

        TransformationMetadata metadata = FakeMetadataFactory.exampleBQT();
        FakeMetadataFactory.setCardinality("bqt1.smalla", 1000, metadata); //$NON-NLS-1$
        FakeMetadataFactory.setCardinality("bqt2.smalla", 10000, metadata); //$NON-NLS-1$
        Column fmo = (Column)metadata.getElementID("bqt1.smalla.intnum");
    fmo.setDistinctValues(1000);
        Column floatnum = (Column)metadata.getElementID("bqt1.smalla.floatnum");
        floatnum.setDistinctValues(800);

        ProcessorPlan plan = TestOptimizer.helpPlan(
            "SELECT max(a.stringkey) from bqt1.smalla a, bqt2.smalla a2, bqt1.smalla a1 where a.intnum = a2.intnum and a1.stringnum = a2.stringnum and a.floatnum = a1.floatnum"//$NON-NLS-1$
            metadata,
View Full Code Here

  private Schema getSchema(String vdbName, int vdbVersion, String schemaName) {
    VDBMetaData vdb = this.vdbRepository.getVDB(vdbName, vdbVersion);
    if (vdb == null) {
      return null;
    }
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    if (tm == null) {
      return null;
    }
    return tm.getMetadataStore().getSchemas().get(schemaName.toUpperCase());
  }
View Full Code Here

      String name, String value) {
    VDBMetaData vdb = this.vdbRepository.getVDB(vdbName, vdbVersion);
    if (vdb == null) {
      return;
    }
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    if (tm == null) {
      return;
    }
    AbstractMetadataRecord record = DataTierManagerImpl.getByUuid(tm.getMetadataStore(), uuid);
    if (record != null) {
      record.setProperty(name, value);
    }
  }
View Full Code Here

        params.add(RealMetadataFactory.createParameter("end", SPParameter.IN, TypeFacility.RUNTIME_NAMES.TIMESTAMP));
       
        Procedure getUpdated = RealMetadataFactory.createStoredProcedure("GetUpdated", salesforceModel, params, "GetUpdated");
        getUpdated.setResultSet(RealMetadataFactory.createResultSet("rs", new String[] {"updated"}, new String[] {TypeFacility.RUNTIME_NAMES.STRING}));
       
        return new TransformationMetadata(null, new CompositeMetadataStore(store), null, FakeMetadataFactory.SFM.getSystemFunctions(), null);
    }   
View Full Code Here

        cols.get(1).setNameInSource("ID:SEQUENCE=MYSEQUENCE.nextVal"); //$NON-NLS-1$
        cols.get(2).setNativeType("date"); //$NON-NLS-1$
        RealMetadataFactory.createElements(dual, new String[] {"something"}, new String[] {DataTypeManager.DefaultDataTypes.STRING}); //$NON-NLS-1$
       
        CompositeMetadataStore store = new CompositeMetadataStore(metadataStore);
        return new TransformationMetadata(null, store, null, FakeMetadataFactory.SFM.getSystemFunctions(), null);
    }
View Full Code Here

  }
 
  @Test public void testSystemMatViewsWithRowRefresh() throws Exception {
    //TOOD: remove this. it's a workaround for TEIIDDES-549
    VDBMetaData vdb = server.getVDB(MATVIEWS);
    TransformationMetadata tm = vdb.getAttachment(TransformationMetadata.class);
    Table t = tm.getGroupID("TEST.RANDOMVIEW");
    t.setSelectTransformation("/*+ cache(updatable) */ " +  t.getSelectTransformation());
   
    Statement s = conn.createStatement();
    //prior to load refresh of a single row returns -1
    ResultSet rs = s.executeQuery("select * from (call refreshMatViewRow('TEST.RANDOMVIEW', 0)) p");
View Full Code Here

       
        Column obj = cols.get(0);
        obj.setNativeType("uniqueidentifier"); //$NON-NLS-1$
       
        CompositeMetadataStore store = new CompositeMetadataStore(metadataStore);
        QueryMetadataInterface metadata = new TransformationMetadata(null, store, null, FakeMetadataFactory.SFM.getSystemFunctions(), null);
       
        TranslationUtility tu = new TranslationUtility(metadata);
        Command command = tu.parseCommand("select max(x) from bar"); //$NON-NLS-1$
        TranslationHelper.helpTestVisitor("SELECT MAX(cast(bar.x as char(36))) FROM bar", trans, command); //$NON-NLS-1$
       
View Full Code Here

TOP

Related Classes of org.teiid.query.metadata.TransformationMetadata$LiveQueryNode

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.