[ https://issues.apache.org/jira/browse/HIVE-26126?focusedWorklogId=798340&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-798340 ]
ASF GitHub Bot logged work on HIVE-26126: ----------------------------------------- Author: ASF GitHub Bot Created on: 05/Aug/22 09:24 Start Date: 05/Aug/22 09:24 Worklog Time Spent: 10m Work Description: dengzhhu653 commented on PR #3197: URL: https://github.com/apache/hive/pull/3197#issuecomment-1206239524 +1, changes look good to me! Issue Time Tracking ------------------- Worklog Id: (was: 798340) Time Spent: 50m (was: 40m) > Allow capturing/validating SQL generated from HMS calls in qtests > ----------------------------------------------------------------- > > Key: HIVE-26126 > URL: https://issues.apache.org/jira/browse/HIVE-26126 > Project: Hive > Issue Type: Improvement > Components: Testing Infrastructure > Reporter: Stamatis Zampetakis > Assignee: Stamatis Zampetakis > Priority: Major > Labels: pull-request-available > Time Spent: 50m > Remaining Estimate: 0h > > During the compilation/execution of a Hive command there are usually calls in > the HiveMetastore (HMS). Most of the time these calls need to connect to the > underlying database backend in order to return the requested information so > they trigger the generation and execution of SQL queries. > We have a lot of code in Hive which affects the generation and execution of > these SQL queries and some vivid examples are the {{MetaStoreDirectSql}} and > {{CachedStore}} classes. > [MetaStoreDirectSql|https://github.com/apache/hive/blob/e8f3a6cdc22c6a4681af2ea5763c80a5b76e310b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/MetaStoreDirectSql.java] > is responsible for building explicitly SQL queries for performance reasons. > [CachedStore|https://github.com/apache/hive/blob/e8f3a6cdc22c6a4681af2ea5763c80a5b76e310b/standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java] > is responsible for caching certain requests to avoid going to the database > on every call. > Ensuring that the generated SQL is the expected one and/or that certain > queries are hitting (or not) the DB is valuable for catching regressions or > evaluating the effectiveness of caches. > The idea is that for each Hive command/query in some qtest there is an option > to include in the output (.q.out) the list of SQL queries that were generated > by HMS calls. -- This message was sent by Atlassian Jira (v8.20.10#820010)