Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
v3.0.0-alpha2
-
None
-
None
Description
when i make a query like this
//sql SELECT t.* FROM ( SELECT a.*,ROW_NUMBER() OVER(PARTITION BY data_id ORDER BY data_update_time desc) AS r FROM kylin_stream_order a WHERE a.type = 'UPDATE') t LIMIT 10
It's ok. I can get answer.
But when i make a query like this
//sql SELECT t.* FROM ( SELECT a.*,ROW_NUMBER() OVER(PARTITION BY data_id ORDER BY data_update_time desc) AS r FROM kylin_stream_order a WHERE a.type = 'UPDATE') t WHERE t.r = 1 LIMIT 10
It's not ok. I get Nothing. However, same query for off-line cube, It's ok.
So, I think real-time query can't support derivative field for condition. Using `ROW_NUMBER` function to remove duplication is a common scenario. Please make real-time support it.