public GlobalTableStoreImpl(BufferManager bufferManager, VDBMetaData vdbMetaData, QueryMetadataInterface metadata) { this.bufferManager = bufferManager; this.vdbMetaData = vdbMetaData; this.metadata = new TempMetadataAdapter(metadata, new TempMetadataStore()); }
public GlobalTableStoreImpl(BufferManager bufferManager, VDBMetaData vdbMetaData, QueryMetadataInterface metadata) { this.bufferManager = bufferManager; this.vdbMetaData = vdbMetaData; this.metadata = new TempMetadataAdapter(metadata, new TempMetadataStore()); }
private static void setTempMetadata(final QueryMetadataInterface metadata, final AbstractValidationVisitor visitor, LanguageObject obj) { if (obj instanceof Command) { Command command = (Command)obj; visitor.currentCommand = command; TempMetadataStore tempMetadata = command.getTemporaryMetadata(); if(tempMetadata != null && !tempMetadata.getData().isEmpty()) { visitor.setMetadata(new TempMetadataAdapter(metadata, tempMetadata)); } } }
private static void setTempMetadata(final QueryMetadataInterface metadata, final AbstractValidationVisitor visitor, LanguageObject obj) { if (obj instanceof Command) { Command command = (Command)obj; visitor.currentCommand = command; TempMetadataStore tempMetadata = command.getTemporaryMetadata(); if(tempMetadata != null && !tempMetadata.getData().isEmpty()) { visitor.setMetadata(new TempMetadataAdapter(metadata, tempMetadata)); } } }
private static void setTempMetadata(final QueryMetadataInterface metadata, final AbstractValidationVisitor visitor, LanguageObject obj) { if (obj instanceof Command) { Command command = (Command)obj; visitor.currentCommand = command; TempMetadataStore tempMetadata = command.getTemporaryMetadata(); if(tempMetadata != null && !tempMetadata.getData().isEmpty()) { visitor.setMetadata(new TempMetadataAdapter(metadata, tempMetadata)); } } }
@Override protected QueryMetadataInterface createDesignTimeMetadata() { if (isSession()) { return new TempMetadataAdapter(this.actualMetadata.getDesignTimeMetadata(), new TempMetadataStore()); } return new TempMetadataAdapter(this.actualMetadata.getDesignTimeMetadata(), tempStore, materializationTables, queryNodes); }
@Override protected QueryMetadataInterface createDesignTimeMetadata() { if (isSession()) { return new TempMetadataAdapter(this.actualMetadata.getDesignTimeMetadata(), new TempMetadataStore()); } return new TempMetadataAdapter(this.actualMetadata.getDesignTimeMetadata(), tempStore, materializationTables, queryNodes); }
@Override protected QueryMetadataInterface createDesignTimeMetadata() { if (isSession()) { return new TempMetadataAdapter(this.actualMetadata.getDesignTimeMetadata(), new TempMetadataStore()); } return new TempMetadataAdapter(this.actualMetadata.getDesignTimeMetadata(), tempStore, materializationTables, queryNodes); }
public QueryMetadataInterface getSessionMetadata() { if (isSession()) { TempMetadataAdapter tma = new TempMetadataAdapter(new BasicQueryMetadata(), this.tempStore); tma.session = true; return tma; } return this.actualMetadata.getSessionMetadata(); }
public QueryMetadataInterface getSessionMetadata() { if (isSession()) { TempMetadataAdapter tma = new TempMetadataAdapter(new BasicQueryMetadata(), this.tempStore); tma.session = true; return tma; } return this.actualMetadata.getSessionMetadata(); }
public QueryMetadataInterface getSessionMetadata() { if (isSession()) { TempMetadataAdapter tma = new TempMetadataAdapter(new BasicQueryMetadata(), this.tempStore); tma.session = true; return tma; } return this.actualMetadata.getSessionMetadata(); }
public void setUp(QueryMetadataInterface qmi, ProcessorDataManager dm, BufferManager bm) { tempStore = new TempTableStore("1", TransactionMode.ISOLATE_WRITES); //$NON-NLS-1$ metadata = new TempMetadataAdapter(qmi, tempStore.getMetadataStore()); metadata.setSession(true); SessionAwareCache<CachedResults> cache = new SessionAwareCache<CachedResults>("resultset", DefaultCacheFactory.INSTANCE, SessionAwareCache.Type.RESULTSET, 0); cache.setTupleBufferCache(bm); dataManager = new TempTableDataManager(dm, bm, cache); }
public static void helpTestProcess(ProcessorPlan procPlan, List[] expectedResults, ProcessorDataManager dataMgr, QueryMetadataInterface metadata) throws Exception { CommandContext context = new CommandContext("pID", null, null, null, 1); //$NON-NLS-1$ if (!(metadata instanceof TempMetadataAdapter)) { metadata = new TempMetadataAdapter(metadata, new TempMetadataStore()); } context.setMetadata(metadata); TestProcessor.helpProcess(procPlan, context, dataMgr, expectedResults); assertNotNull("Expected processing to fail", expectedResults); }
/** * Test planning stored queries. GeminiStoredQueryTestPlan - 5b */ @Ignore("stored procedure wrapper removal logic has been removed") @Test public void testStoredQuery10() { ProcessorPlan plan = TestOptimizer.helpPlan("EXEC pm1.sq5('1')", new TempMetadataAdapter(RealMetadataFactory.example1Cached(), new TempMetadataStore()), //$NON-NLS-1$ new String[] { "SELECT e1, e2 FROM pm1.g1 WHERE e1 = '1'"}); //$NON-NLS-1$ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN); }
/** * Test planning stored queries. GeminiStoredQueryTestPlan - 6d */ @Ignore("stored procedure wrapper removal logic has been removed") @Test public void testStoredQuery15() { ProcessorPlan plan = TestOptimizer.helpPlan("EXEC pm1.sq10('1', 2)", new TempMetadataAdapter(RealMetadataFactory.example1Cached(), new TempMetadataStore()), //$NON-NLS-1$ new String[] { "SELECT e1 FROM pm1.g1 WHERE (e1 = '1') AND (e2 = 2)" }); //$NON-NLS-1$ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN); }
@Ignore("stored procedure wrapper removal logic has been removed") @Test public void testStoredQuery18() { ProcessorPlan plan = TestOptimizer.helpPlan("EXEC pm1.sq12('1', 1)", new TempMetadataAdapter(RealMetadataFactory.example1Cached(), new TempMetadataStore()), //$NON-NLS-1$ new String[] { "INSERT INTO pm1.g1 (e1, e2) VALUES ('1', 1)" }); //$NON-NLS-1$ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN); }
@Ignore("stored procedure wrapper removal logic has been removed") @Test public void testStoredQuery21() { ProcessorPlan plan = TestOptimizer.helpPlan("EXEC pm1.sq15('1', 2)", new TempMetadataAdapter(RealMetadataFactory.example1Cached(), new TempMetadataStore()), //$NON-NLS-1$ new String[] { "DELETE FROM pm1.g1 WHERE (e1 = '1') AND (e2 = 2)" }); //$NON-NLS-1$ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN); }
@Ignore("stored procedure wrapper removal logic has been removed") @Test public void testStoredQuery25() { ProcessorPlan plan = TestOptimizer.helpPlan("EXEC pm1.sq15(1, 2)", new TempMetadataAdapter(RealMetadataFactory.example1Cached(), new TempMetadataStore()), //$NON-NLS-1$ new String[] { "DELETE FROM pm1.g1 WHERE (e1 = '1') AND (e2 = 2)" }); //$NON-NLS-1$ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN); }
/** * Test planning stored queries. GeminiStoredQueryTestPlan - 6c */ @Ignore("stored procedure wrapper removal logic has been removed") @Test public void testStoredQuery13() { ProcessorPlan plan = TestOptimizer.helpPlan("EXEC pm1.sq8('1')", new TempMetadataAdapter(RealMetadataFactory.example1Cached(), new TempMetadataStore()), //$NON-NLS-1$ new String[] { "SELECT e1 FROM pm1.g1 WHERE e1 = '1'" }); //$NON-NLS-1$ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN); }
@Ignore("stored procedure wrapper removal logic has been removed") @Test public void testStoredQuery23() { ProcessorPlan plan = TestOptimizer.helpPlan("EXEC pm1.sq16()", new TempMetadataAdapter(RealMetadataFactory.example1Cached(), new TempMetadataStore()), //$NON-NLS-1$ new String[] { "INSERT INTO pm1.g1 (e1, e2) VALUES ('1', 2)" }); //$NON-NLS-1$ TestOptimizer.checkNodeTypes(plan, TestOptimizer.FULL_PUSHDOWN); }