[ https://issues.apache.org/jira/browse/FLINK-23643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17394450#comment-17394450 ]
YUJIANBO commented on FLINK-23643: ---------------------------------- [~jark] {{ROW_NUMBER() only get *one* first data, my business want *to the joint first place* data.}} > 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 > Priority: Major > > 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)