In Hive 3.1.x, we found that the following query executes successfully: ```sql select row_number() over(distribute by id sort by update_time desc) as row_num from (select 1 as id, current_timestamp as update_time) t ``` <img width="1282" height="478" alt="Image" src="https://github.com/user-attachments/assets/bc1c7c36-3d07-450c-bbd9-b6f341b9c9af" /> <img width="1274" height="566" alt="Image" src="https://github.com/user-attachments/assets/10afc27d-d702-485f-b0c9-34ce3d3cd998" /> However, when generating the AST using **the latest code from the main branch**, the following error occurs: <img width="1920" height="597" alt="Image" src="https://github.com/user-attachments/assets/a19d6dfc-7a71-4d19-913b-06bec0d8609f" /> Reference documentation: https://github.com/apache/hive/blob/master/parser/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g#L293-L297 https://github.com/apache/hive/blob/master/parser/src/java/org/apache/hadoop/hive/ql/parse/SelectClauseParser.g#L135-L139 https://github.com/apache/hive/blob/master/parser/src/java/org/apache/hadoop/hive/ql/parse/FromClauseParser.g#L271-L27
In Hive 3.1.x, we found that the following query executes successfully:
However, when generating the AST using the latest code from the main branch, the following error occurs:
Reference documentation:
https://github.com/apache/hive/blob/master/parser/src/java/org/apache/hadoop/hive/ql/parse/IdentifiersParser.g#L293-L297
https://github.com/apache/hive/blob/master/parser/src/java/org/apache/hadoop/hive/ql/parse/SelectClauseParser.g#L135-L139
https://github.com/apache/hive/blob/master/parser/src/java/org/apache/hadoop/hive/ql/parse/FromClauseParser.g#L271-L27