[ https://issues.apache.org/jira/browse/HIVE-27330?focusedWorklogId=861605&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-861605 ]
ASF GitHub Bot logged work on HIVE-27330: ----------------------------------------- Author: ASF GitHub Bot Created on: 11/May/23 18:42 Start Date: 11/May/23 18:42 Worklog Time Spent: 10m Work Description: veghlaci05 commented on code in PR #4306: URL: https://github.com/apache/hive/pull/4306#discussion_r1191560586 ########## standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/CompactionTxnHandler.java: ########## @@ -258,6 +258,7 @@ public CompactionInfo findNextToCompact(FindNextCompactRequest rqst) throws Meta sb.append("\"CQ_POOL_NAME\" IS NULL OR \"CQ_ENQUEUE_TIME\" < (") .append(getEpochFn(dbProduct)).append(" - ").append(poolTimeout).append(")"); } + sb.append(" ORDER BY CQ_ID ASC"); Review Comment: Actually I prefer writing old school SQL code. ORM tools are great for simple CRUD, but when the query is getting more complex than a select with a where, you will end up using a ton of annotations and JPQL wich IMHO neither less complex nor faster compared to plain old SQL. Issue Time Tracking ------------------- Worklog Id: (was: 861605) Time Spent: 50m (was: 40m) > Compaction entry dequeue order > ------------------------------ > > Key: HIVE-27330 > URL: https://issues.apache.org/jira/browse/HIVE-27330 > Project: Hive > Issue Type: Improvement > Components: Hive > Reporter: László Végh > Assignee: László Végh > Priority: Major > Labels: pull-request-available > Fix For: 4.0.0 > > Time Spent: 50m > Remaining Estimate: 0h > > Compaction entries currently dequeued in an unordered way which makes the > actual ordering DB dependent. The dequeue should be done in an ordered way: > ascending by the compaction id. -- This message was sent by Atlassian Jira (v8.20.10#820010)