Why would you expect a count of anything other than 1 if you are grouping by name also? Do you mean to count the ids instead?
Thanks for the reply.
My table TEST looks like below
With the given query I am expecting the results like below-> Results-1
But it is returning results like below -> Results-2
I am attaching the modified test case which doesn't have any continuous executions.
We observed that, if we use Teiid connection to connect and internally it is using TeiidPreparedStatementImpl, which is giving result set as Results-2.
If we use H2 connection, and it is returning proper results as mentioned in Results-1.
Sorry, ignore my first comment. I had to take a second look at what you had (in general a test case that is free of external dependencies is need). This is unrelated to continusous queries. The aggregate decomposition has a bug in the case of count(col) that matters in this and in similar circumstances. I've logged https://issues.jboss.org/browse/TEIID-2397 for this. In your case you can use the workaround of count(*) if you do not expect any null names or you can add a null check if you do.
Thanks Steve, your workaround is working fine in our test case.