Incorrect result if multiple aggregate functions used
-----------------------------------------------------
Key: TEIID-3265
URL:
https://issues.jboss.org/browse/TEIID-3265
Project: Teiid
Issue Type: Bug
Components: Embedded
Affects Versions: 8.9
Reporter: Renat Zhilkibaev
Assignee: Steven Hawkins
When using multiple aggregate functions the value returned by the first one is used as a
result of the second one.
With data looking like this:
SYMBOL,PRICE
GE,10.45
GE,15.45
GE,20.45
and this query:
select symbol, max(price), min(price) from mytable group by symbol
result looks like this:
GE, 20.45,20.45
Note the last value is 20.45 which is not a correct value (10.45).
To reproduce download teiid-8.9.0.Final-embedded-dist.zip from
http://sourceforge.net/projects/teiid/files/teiid-8.9.0.Final-embedded-di...
replace content of examples/embedded-portfolio/data/marketdata-price.txt with
SYMBOL,PRICE
GE,10.45
GE,15.45
GE,20.45
Then change the query at
examples/embedded-portfolio/src/org/teiid/example/TeiidEmbeddedPortfolio.java line 186 to
be "select symbol, max(price), min(price) from MyView.portfolio group by
symbol"
Then execute examples/embedded-portfolio/run.sh