-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
8.9
-
None
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-dist.zip/download
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