[
https://issues.apache.org/jira/browse/HIVE-24515?focusedWorklogId=860248&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-860248
]
ASF GitHub Bot logged work on HIVE-24515:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 03/May/23 09:13
Start Date: 03/May/23 09:13
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #1834:
URL: https://github.com/apache/hive/pull/1834#discussion_r570556176
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/txn/TxnHandler.java:
##########
@@ -4797,6 +4800,84 @@ private void heartbeatTxn(Connection dbConn, long txnid)
}
}
+ private boolean foundCommittedTransaction(Connection dbConn, long txnId,
FindStatStatusByWriteIdRequest rqst,
+ String condition) throws
SQLException, MetaException {
+ String s = sqlGenerator.addLimitClause(1,
+ "1 FROM \"COMPLETED_TXN_COMPONENTS\" WHERE \"CTC_TXNID\" " +
condition + " " + txnId +
+ " AND \"CTC_DATABASE\" = ? AND \"CTC_TABLE\" = ?");
Review Comment:
You do not need db and table filters as txnid is unique across them, see
findTxnState(). Same query is duplicated in many other places like
getCommittedTxns(), see if you could extract it.
Issue Time Tracking
-------------------
Worklog Id: (was: 860248)
Time Spent: 3h 10m (was: 3h)
> Analyze table job can be skipped when stats populated are already accurate
> --------------------------------------------------------------------------
>
> Key: HIVE-24515
> URL: https://issues.apache.org/jira/browse/HIVE-24515
> Project: Hive
> Issue Type: Improvement
> Reporter: Rajesh Balamohan
> Assignee: mahesh kumar behera
> Priority: Major
> Labels: pull-request-available
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> For non-partitioned tables, stats detail should be present in table level,
> e.g
> {noformat}
> COLUMN_STATS_ACCURATE={"BASIC_STATS":"true","COLUMN_STATS":{"d_current_day":"true"...
> }}
> {noformat}
> For partitioned tables, stats detail should be present in partition level,
> {noformat}
> store_sales(ss_sold_date_sk=2451819)
> {totalSize=0, numRows=0, rawDataSize=0,
> COLUMN_STATS_ACCURATE={"BASIC_STATS":"true","COLUMN_STATS":{"ss_addr_sk":"true"....}}
>
> {noformat}
> When stats populated are already accurate, {{analyze table tn compute
> statistics for columns}} should skip launching the job.
>
> For ACID tables, stats are auto computed and it can skip computing stats
> again when stats are accurate.
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)