YUJIANBO created FLINK-23643:
--------------------------------

             Summary: I repeated the same problem: ROW/RANGE not allowed with 
RANK, DENSE_RANK or ROW_NUMBER functions
                 Key: FLINK-23643
                 URL: https://issues.apache.org/jira/browse/FLINK-23643
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / Planner
    Affects Versions: 1.12.0
            Reporter: YUJIANBO


I found a problem that was fixed in 1.12.0 and FLINK-18440, but I repeated the 
same problem:
ROW/RANGE not allowed with RANK, DENSE_RANK or ROW_NUMBER functions.

this is my sql:
```
create temporary view tmp as 
select 
   area_zip,
   store_id,
   product_id,
   batch_id,
   RANK() over (PARTITION BY area_zip,store_id,product_id ORDER BY ts DESC 
RANGE BETWEEN INTERVAL '5' MINUTE preceding AND CURRENT ROW) AS num_rank 
from pricechangelogs;


insert into print_table 
select * from tmp where num_rank = 1;
```



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to