[JBoss JIRA] (TEIID-3201) Pushing a predicate when it is used in an order by statement in a window function
by Bram Gadeyne (JIRA)
Bram Gadeyne created TEIID-3201:
-----------------------------------
Summary: Pushing a predicate when it is used in an order by statement in a window function
Key: TEIID-3201
URL: https://issues.jboss.org/browse/TEIID-3201
Project: Teiid
Issue Type: Bug
Affects Versions: 8.7
Reporter: Bram Gadeyne
Assignee: Steven Hawkins
The issue was described in the following community post: https://developer.jboss.org/thread/249972
I have a table that contains some temperature values. I'd like to make some time series selecting the previous value by joining all previous values and selecting the first previous value using the rank function.
e.g.
select v.*
from(
select mv1.admissionid, mv1.time as temptime, mv1.value as degrees, mv2.time as previoustime, mv2.value as previousdegrees,
rank() over(partition by mv1.admissionid, mv1.time order by mv2.time desc) as rang
from cos2_monitorvalue mv1
left join cos2_monitorvalue mv2 on
mv2.admissionid = mv1.admissionid and
mv2.time < mv1.time and
mv2.variableid = mv1.variableid
where mv1.variableid = 'TEMPCENTR'
) v
where v.rang = 1 and
v.admissionid = 11111
Is there a way to tell Teiid that v.admissionid should be used when selecting rows from mv1?
Reply from Steven Hawkins on this question:
The current logic (8.4+) is checking if the predicate is compatible with the partition, but if there is an ordering on the window function then the predicate won't be pushed. This is too strict for the case that you have where the predicate is just over the partition - if it were against any other columns it could alter the aggregate values. Can you convert this to an issue?
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 10 months
[JBoss JIRA] (TEIID-3200) Teiid 8.8.1 embedded version doesn't work with IBM JDK 6
by Ivan Chan (JIRA)
[ https://issues.jboss.org/browse/TEIID-3200?page=com.atlassian.jira.plugin... ]
Ivan Chan commented on TEIID-3200:
----------------------------------
And I found a potential workaround:
I tried to swap back to use infinspan-core-5.1.2.jar instead of version 5.2.7 in Teiid 8.8.1, and it seems to work. Do you guys see any issue with this workaround?
Thanks,
Ivan
> Teiid 8.8.1 embedded version doesn't work with IBM JDK 6
> --------------------------------------------------------
>
> Key: TEIID-3200
> URL: https://issues.jboss.org/browse/TEIID-3200
> Project: Teiid
> Issue Type: Bug
> Components: Embedded
> Affects Versions: 8.8
> Environment: Running Teiid 8.8.1 with IBM JDK 6
> Reporter: Ivan Chan
> Assignee: Steven Hawkins
> Labels: teiid
>
> Teiid 8.7 used to work with IBM JDK 6, but not Teiid 8.8.1.
> It causes the following error:
> [java] Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.commands.CommandsFactoryImpl.setupDependencies(org.infinispan.container.DataContainer,org.infinispan.notifications.cachelistener.CacheNotifier,org.infinispan.Cache,org.infinispan.interceptors.InterceptorChain,org.infinispan.distribution.DistributionManager,org.infinispan.context.InvocationContextContainer,org.infinispan.transaction.TransactionTable,org.infinispan.configuration.cache.Configuration,java.util.Map,org.infinispan.transaction.xa.recovery.RecoveryManager,org.infinispan.statetransfer.StateProvider,org.infinispan.statetransfer.StateConsumer,org.infinispan.util.concurrent.locks.LockManager,org.infinispan.container.InternalEntryFactory,org.infinispan.distexec.mapreduce.MapReduceManager,org.infinispan.statetransfer.StateTransferManager,org.infinispan.xsite.BackupSender,org.infinispan.commands.CancellationService) on object of type CommandsFactoryImpl with parameters [org.infinispan.container.DefaultDataContainer@189b189b, org.infinispan.notifications.cachelistener.CacheNotifierImpl@400e400e, Cache 'resultset'@43084308,
> [java] >> org.infinispan.interceptors.InvocationContextInterceptor, null, org.infinispan.context.TransactionalInvocationContextContainer@3050305, org.infinispan.transaction.TransactionTable@54695469, Configuration{classLoader=null, clustering=ClusteringConfiguration{async=AsyncConfiguration{asyncMarshalling=false, replicationQueue=null, replicationQueueInterval=5000, replicationQueueMaxElements=1000, useReplicationQueue=false}, cacheMode=LOCAL, hash=HashConfiguration{consistentHashFactory=null, hash=MurmurHash3, numOwners=2, numSegments=60, groupsConfiguration=GroupsConfiguration{enabled=false, groupers=[]}, stateTransferConfiguration=StateTransferConfiguration{chunkSize=10000, fetchInMemoryState=false, originalFetchInMemoryState=null, timeout=240000, awaitInitialTransfer=false, originalAwaitInitialTransfer=null}}, l1=L1Configuration{enabled=false, invalidationThreshold=0, lifespan=600000, onRehash=false, cleanupTaskFrequency=600000}, stateTransfer=StateTransferConfiguration{chunkSize=10000, fetchInMemoryState=false, originalFetchInMemoryState=null, timeout=240000, awaitInitialTransfer=false, originalAwaitInitialTransfer=null}, sync=SyncConfiguration{replTimeout=15000}}, customInterceptors=CustomInterceptorsConfiguration{interceptors=[]}, dataContainer=DataContainerConfiguration{dataContainer=null}, deadlockDetection=DeadlockDetectionConfiguration{enabled=false, spinDuration=100}, eviction=EvictionConfiguration{maxEntries=1024, strategy=LIRS, threadPolicy=DEFAULT}, expiration=ExpirationConfiguration{lifespan=7200000, maxIdle=-1, reaperEnabled=true, wakeUpInterval=60000}, indexing=IndexingConfiguration{enabled=false, indexLocalOnly=false}, invocationBatching=InvocationBatchingConfiguration{enabled=false}, jmxStatistics=JMXStatisticsConfiguration{enabled=false}, loaders=LoadersConfiguration{cacheLoaders=[], passivation=false, preload=false, shared=false}, locking=LockingConfiguration{concurrencyLevel=32, isolationLevel=READ_COMMITTED, lockAcquisitionTimeout=10000, useLockStriping=false, writeSkewCheck=false}, modules={}, storeAsBinary=StoreAsBinaryConfiguration{enabled=false, storeKeysAsBinary=true, storeValuesAsBinary=true}, transaction=TransactionConfiguration{autoCommit=true, cacheStopTimeout=30000, eagerLockingSingleNode=false, lockingMode=OPTIMISTIC, syncCommitPhase=true, syncRollbackPhase=false, transactionManagerLookup=org.infinispan.transaction.lookup.GenericTransactionManagerLookup@4da54da5, transactionSynchronizationRegistryLookup=null, transactionMode=TRANSACTIONAL, useEagerLocking=false, useSynchronization=true, recovery=RecoveryConfiguration{enabled=true, recoveryInfoCacheName='__recoveryInfoCacheName__'}, reaperWakeUpInterval=1000, completedTxTimeout=15000, use1PcForAutoCommitTransactions=false}, versioning=VersioningConfiguration{enabled=false, scheme=NONE}, unsafe=UnsafeConfiguration{unreliableReturnValues=false}, sites=SiteConfiguration{allBackups=[], backupFor=BackupForConfiguration{remoteCache='null', remoteSite='null'}, disableBackups=false, inUseBackupSites=[]}}, {}, {}, null, null, org.infinispan.util.concurrent.locks.LockManagerImpl@15b815b8, org.infinispan.container.InternalEntryFactoryImpl@1c921c92, org.infinispan.distexec.mapreduce.MapReduceManagerImpl@6e906e90, null, org.infinispan.xsite.BackupSenderImpl@39643964, org.infinispan.commands.CancellationServiceImpl@2ec52ec5]
> Actually, this is a bug in infinispan.
> https://issues.jboss.org/browse/ISPN-3611
> This bug got introduced after upgrading infinspan-core version from 5.1.2 to 5.2.7 in Teiid 8.8.1.
> Maybe Teiid should consider to upgrade infinspan-core to version 6.0 instead.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months
[JBoss JIRA] (TEIID-3200) Teiid 8.8.1 embedded version doesn't work with IBM JDK 6
by Ivan Chan (JIRA)
Ivan Chan created TEIID-3200:
--------------------------------
Summary: Teiid 8.8.1 embedded version doesn't work with IBM JDK 6
Key: TEIID-3200
URL: https://issues.jboss.org/browse/TEIID-3200
Project: Teiid
Issue Type: Bug
Components: Embedded
Affects Versions: 8.8
Environment: Running Teiid 8.8.1 with IBM JDK 6
Reporter: Ivan Chan
Assignee: Steven Hawkins
Teiid 8.7 used to work with IBM JDK 6, but not Teiid 8.8.1.
It causes the following error:
[java] Caused by: org.infinispan.CacheException: Unable to invoke method public void org.infinispan.commands.CommandsFactoryImpl.setupDependencies(org.infinispan.container.DataContainer,org.infinispan.notifications.cachelistener.CacheNotifier,org.infinispan.Cache,org.infinispan.interceptors.InterceptorChain,org.infinispan.distribution.DistributionManager,org.infinispan.context.InvocationContextContainer,org.infinispan.transaction.TransactionTable,org.infinispan.configuration.cache.Configuration,java.util.Map,org.infinispan.transaction.xa.recovery.RecoveryManager,org.infinispan.statetransfer.StateProvider,org.infinispan.statetransfer.StateConsumer,org.infinispan.util.concurrent.locks.LockManager,org.infinispan.container.InternalEntryFactory,org.infinispan.distexec.mapreduce.MapReduceManager,org.infinispan.statetransfer.StateTransferManager,org.infinispan.xsite.BackupSender,org.infinispan.commands.CancellationService) on object of type CommandsFactoryImpl with parameters [org.infinispan.container.DefaultDataContainer@189b189b, org.infinispan.notifications.cachelistener.CacheNotifierImpl@400e400e, Cache 'resultset'@43084308,
[java] >> org.infinispan.interceptors.InvocationContextInterceptor, null, org.infinispan.context.TransactionalInvocationContextContainer@3050305, org.infinispan.transaction.TransactionTable@54695469, Configuration{classLoader=null, clustering=ClusteringConfiguration{async=AsyncConfiguration{asyncMarshalling=false, replicationQueue=null, replicationQueueInterval=5000, replicationQueueMaxElements=1000, useReplicationQueue=false}, cacheMode=LOCAL, hash=HashConfiguration{consistentHashFactory=null, hash=MurmurHash3, numOwners=2, numSegments=60, groupsConfiguration=GroupsConfiguration{enabled=false, groupers=[]}, stateTransferConfiguration=StateTransferConfiguration{chunkSize=10000, fetchInMemoryState=false, originalFetchInMemoryState=null, timeout=240000, awaitInitialTransfer=false, originalAwaitInitialTransfer=null}}, l1=L1Configuration{enabled=false, invalidationThreshold=0, lifespan=600000, onRehash=false, cleanupTaskFrequency=600000}, stateTransfer=StateTransferConfiguration{chunkSize=10000, fetchInMemoryState=false, originalFetchInMemoryState=null, timeout=240000, awaitInitialTransfer=false, originalAwaitInitialTransfer=null}, sync=SyncConfiguration{replTimeout=15000}}, customInterceptors=CustomInterceptorsConfiguration{interceptors=[]}, dataContainer=DataContainerConfiguration{dataContainer=null}, deadlockDetection=DeadlockDetectionConfiguration{enabled=false, spinDuration=100}, eviction=EvictionConfiguration{maxEntries=1024, strategy=LIRS, threadPolicy=DEFAULT}, expiration=ExpirationConfiguration{lifespan=7200000, maxIdle=-1, reaperEnabled=true, wakeUpInterval=60000}, indexing=IndexingConfiguration{enabled=false, indexLocalOnly=false}, invocationBatching=InvocationBatchingConfiguration{enabled=false}, jmxStatistics=JMXStatisticsConfiguration{enabled=false}, loaders=LoadersConfiguration{cacheLoaders=[], passivation=false, preload=false, shared=false}, locking=LockingConfiguration{concurrencyLevel=32, isolationLevel=READ_COMMITTED, lockAcquisitionTimeout=10000, useLockStriping=false, writeSkewCheck=false}, modules={}, storeAsBinary=StoreAsBinaryConfiguration{enabled=false, storeKeysAsBinary=true, storeValuesAsBinary=true}, transaction=TransactionConfiguration{autoCommit=true, cacheStopTimeout=30000, eagerLockingSingleNode=false, lockingMode=OPTIMISTIC, syncCommitPhase=true, syncRollbackPhase=false, transactionManagerLookup=org.infinispan.transaction.lookup.GenericTransactionManagerLookup@4da54da5, transactionSynchronizationRegistryLookup=null, transactionMode=TRANSACTIONAL, useEagerLocking=false, useSynchronization=true, recovery=RecoveryConfiguration{enabled=true, recoveryInfoCacheName='__recoveryInfoCacheName__'}, reaperWakeUpInterval=1000, completedTxTimeout=15000, use1PcForAutoCommitTransactions=false}, versioning=VersioningConfiguration{enabled=false, scheme=NONE}, unsafe=UnsafeConfiguration{unreliableReturnValues=false}, sites=SiteConfiguration{allBackups=[], backupFor=BackupForConfiguration{remoteCache='null', remoteSite='null'}, disableBackups=false, inUseBackupSites=[]}}, {}, {}, null, null, org.infinispan.util.concurrent.locks.LockManagerImpl@15b815b8, org.infinispan.container.InternalEntryFactoryImpl@1c921c92, org.infinispan.distexec.mapreduce.MapReduceManagerImpl@6e906e90, null, org.infinispan.xsite.BackupSenderImpl@39643964, org.infinispan.commands.CancellationServiceImpl@2ec52ec5]
Actually, this is a bug in infinispan.
https://issues.jboss.org/browse/ISPN-3611
This bug got introduced after upgrading infinspan-core version from 5.1.2 to 5.2.7 in Teiid 8.8.1.
Maybe Teiid should consider to upgrade infinspan-core to version 6.0 instead.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months
[JBoss JIRA] (TEIID-3198) NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3198?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-3198:
----------------------------------
Fix Version/s: 8.9
Affects Version/s: 8.7
Workaround Description: Use WITHOUT RETURN on the execute immediate statement.
Workaround: Workaround Exists
Component/s: Query Engine
> NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
> ----------------------------------------------------------------------------------------------
>
> Key: TEIID-3198
> URL: https://issues.jboss.org/browse/TEIID-3198
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.9
>
>
> I defined a virtual procedure in the VDB using the following definition:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''';
> end;
> ]]>
> </metadata>
> </model>
> {code}
> When I call the virtual procedure:
> {code:sql}exec test_procs.p1(1);{code}
>
> I get the following NPE:
> {code:sql}
> 12:56:59,868 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue37) sAgKanG+4e4X TEIID30019 Unexpected exception for request sAgKanG+4e4X.0: java.lang.NullPointerException
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.filterVirtualElements(RuleAssignOutputElements.java:477) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:238) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:292) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.execute(RuleAssignOutputElements.java:117) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:739) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:221) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:186) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:379) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:288) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:262) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:449) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:331) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:259) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}
> As a workaround, if I use the clause "WITHOUT RETURN" in the execute immediate command, the procedure is correctly executed:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''' WITHOUT RETURN;
> end;
> ]]>
> </metadata>
> </model>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months
[JBoss JIRA] (TEIID-3199) node next batch processing time is computed incorrectly
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3199?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3199.
-----------------------------------
Resolution: Done
changed to be computed based upon the next batch processing time, rather than all of the processing time.
> node next batch processing time is computed incorrectly
> -------------------------------------------------------
>
> Key: TEIID-3199
> URL: https://issues.jboss.org/browse/TEIID-3199
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.5
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.9
>
>
> The node next batch processing time stat is computed incorrectly. It is currently relative to the total processing time (which includes waits due to blocking) and should instead be just the time spent for that node in the next batch call.
> See also TEIID-2475
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months
[JBoss JIRA] (TEIID-3199) node next batch processing time is computed incorrectly
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-3199:
-------------------------------------
Summary: node next batch processing time is computed incorrectly
Key: TEIID-3199
URL: https://issues.jboss.org/browse/TEIID-3199
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 8.5
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.9
The node next batch processing time stat is computed incorrectly. It is currently relative to the total processing time (which includes waits due to blocking) and should instead be just the time spent for that node in the next batch call.
See also TEIID-2475
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months
[JBoss JIRA] (TEIID-3198) NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
by SBS JIRA Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3198?page=com.atlassian.jira.plugin... ]
SBS JIRA Integration updated TEIID-3198:
----------------------------------------
Forum Reference: https://developer.jboss.org/message/909178#909178
> NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
> ----------------------------------------------------------------------------------------------
>
> Key: TEIID-3198
> URL: https://issues.jboss.org/browse/TEIID-3198
> Project: Teiid
> Issue Type: Bug
> Reporter: Salvatore R
> Assignee: Steven Hawkins
>
> I defined a virtual procedure in the VDB using the following definition:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''';
> end;
> ]]>
> </metadata>
> </model>
> {code}
> When I call the virtual procedure:
> {code:sql}exec test_procs.p1(1);{code}
>
> I get the following NPE:
> {code:sql}
> 12:56:59,868 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue37) sAgKanG+4e4X TEIID30019 Unexpected exception for request sAgKanG+4e4X.0: java.lang.NullPointerException
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.filterVirtualElements(RuleAssignOutputElements.java:477) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:238) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:292) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.execute(RuleAssignOutputElements.java:117) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:739) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:221) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:186) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:379) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:288) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:262) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:449) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:331) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:259) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}
> As a workaround, if I use the clause "WITHOUT RETURN" in the execute immediate command, the procedure is correctly executed:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''' WITHOUT RETURN;
> end;
> ]]>
> </metadata>
> </model>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months
[JBoss JIRA] (TEIID-3198) NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
by SBS JIRA Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-3198?page=com.atlassian.jira.plugin... ]
SBS JIRA Integration updated TEIID-3198:
----------------------------------------
Forum Reference: https://developer.jboss.org/message/909178#909178
> NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
> ----------------------------------------------------------------------------------------------
>
> Key: TEIID-3198
> URL: https://issues.jboss.org/browse/TEIID-3198
> Project: Teiid
> Issue Type: Bug
> Reporter: Salvatore R
> Assignee: Steven Hawkins
>
> I defined a virtual procedure in the VDB using the following definition:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''';
> end;
> ]]>
> </metadata>
> </model>
> {code}
> When I call the virtual procedure:
> {code:sql}exec test_procs.p1(1);{code}
>
> I get the following NPE:
> {code:sql}
> 12:56:59,868 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue37) sAgKanG+4e4X TEIID30019 Unexpected exception for request sAgKanG+4e4X.0: java.lang.NullPointerException
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.filterVirtualElements(RuleAssignOutputElements.java:477) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:238) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:292) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.execute(RuleAssignOutputElements.java:117) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:739) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:221) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:186) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:379) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:288) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:262) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:449) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:331) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:259) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
> {code}
> As a workaround, if I use the clause "WITHOUT RETURN" in the execute immediate command, the procedure is correctly executed:
> {code:sql}
> <model visible = "true" type = "VIRTUAL" name = "test_procs">
> <metadata type = "DDL"><![CDATA[
> create virtual procedure p1(a long) returns (res long) as
> begin
> execute immediate 'insert into pg.xyz select ''a''' WITHOUT RETURN;
> end;
> ]]>
> </metadata>
> </model>
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months
[JBoss JIRA] (TEIID-3198) NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
by Salvatore R (JIRA)
Salvatore R created TEIID-3198:
----------------------------------
Summary: NPE on running an "execute immediate" command defined in a virtual procedure (Teiid-8.9.0-CR2)
Key: TEIID-3198
URL: https://issues.jboss.org/browse/TEIID-3198
Project: Teiid
Issue Type: Bug
Reporter: Salvatore R
Assignee: Steven Hawkins
I defined a virtual procedure in the VDB using the following definition:
{code:sql}
<model visible = "true" type = "VIRTUAL" name = "test_procs">
<metadata type = "DDL"><![CDATA[
create virtual procedure p1(a long) returns (res long) as
begin
execute immediate 'insert into pg.xyz select ''a''';
end;
]]>
</metadata>
</model>
{code}
When I call the virtual procedure:
{code:sql}exec test_procs.p1(1);{code}
I get the following NPE:
{code:sql}
12:56:59,868 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue37) sAgKanG+4e4X TEIID30019 Unexpected exception for request sAgKanG+4e4X.0: java.lang.NullPointerException
at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.filterVirtualElements(RuleAssignOutputElements.java:477) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:238) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.assignOutputElements(RuleAssignOutputElements.java:292) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.optimizer.relational.rules.RuleAssignOutputElements.execute(RuleAssignOutputElements.java:117) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:739) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:221) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:159) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.proc.ExecDynamicSqlInstruction.process(ExecDynamicSqlInstruction.java:186) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.proc.ProcedurePlan.processProcedure(ProcedurePlan.java:379) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:288) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:262) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.relational.PlanExecutionNode.nextBatchDirect(PlanExecutionNode.java:118) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:449) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:331) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:259) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.9.0.CR2.jar:8.9.0.CR2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
{code}
As a workaround, if I use the clause "WITHOUT RETURN" in the execute immediate command, the procedure is correctly executed:
{code:sql}
<model visible = "true" type = "VIRTUAL" name = "test_procs">
<metadata type = "DDL"><![CDATA[
create virtual procedure p1(a long) returns (res long) as
begin
execute immediate 'insert into pg.xyz select ''a''' WITHOUT RETURN;
end;
]]>
</metadata>
</model>
{code}
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)
9 years, 11 months