Hi, Maryann
It did recheck the 4.1 version and got the same error messages. 
I checked the error message in the following code: 
https://github.com/apache/phoenix/blob/4.2/phoenix-core/src/it/java/org/apache/phoenix/end2end/DerivedTableIT.java
 
and found that the count (groupby) query use case would fail with 
SQLFeatureNotSupportedException. and then throwing the error message.

Does this mean that inner query with groupby while outer query with count (1) 
would not been supported ? The reason I am trying this feature is that 
we are expecting to get groups count after groupby query. Noting that in mysql 
or oracle this kind of query works well.

Is there any available alternative approach to get the results using the 
current sql support? If so, please kindly tell me.

Thanks, 
Sun.




CertusNet 

From: Maryann Xue
Date: 2014-12-05 23:28
To: [email protected]
CC: dev
Subject: Re: Phoenix-136 did not support aggregate queries with derived tables 
in from clause
Hi Sun,

Which version of Phoenix are you using? This feature is supported from 3.1 and 
4.1. And there is no such error message in Phoenix code base now.


Thanks,
Maryann

On Fri, Dec 5, 2014 at 3:16 AM, [email protected] <[email protected]> 
wrote:
Hi,all
Notice that PHOENIX-136 has already supported derived tables in from clause, 
however, 
aggregate queries would throw error like the following:
   Error: Complex nested queries not supported. (state=,code=0)

The example queries are like : SELECT COUNT (1) FROM (SELECT COUNT (1) FROM 
table WHERE 1=1 GROUP BY COL1) 
while we are expecting to get the final results of distinct groups counts.

Is there any mistake that I am missing or taking the correct grammer? If so, 
please corrects me kindly.
Any available advice will be greately appreciated.

Thanks,
Sun.









-- 
Thanks,
Maryann

Reply via email to