[ https://issues.apache.org/jira/browse/HIVE-26126?focusedWorklogId=798346&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-798346 ]
ASF GitHub Bot logged work on HIVE-26126: ----------------------------------------- Author: ASF GitHub Bot Created on: 05/Aug/22 09:28 Start Date: 05/Aug/22 09:28 Worklog Time Spent: 10m Work Description: dengzhhu653 commented on code in PR #3197: URL: https://github.com/apache/hive/pull/3197#discussion_r938632450 ########## ql/src/test/results/clientpositive/llap/list_bucket_dml_9.q.out: ########## @@ -14,6 +14,16 @@ POSTHOOK: query: create table list_bucketing_static_part_n0 (key String, value S POSTHOOK: type: CREATETABLE POSTHOOK: Output: database:default POSTHOOK: Output: default@list_bucketing_static_part_n0 +SQL Query : "select "DB_ID" from "DBS"" +SQL Query : "select "DB_ID" from "DBS"" +SQL Query : "select "DB_ID" from "DBS"" +SQL Query : "select "DB_ID", "NAME", "DB_LOCATION_URI", "DESC", "OWNER_NAME", "OWNER_TYPE", "CTLG_NAME" , "CREATE_TIME", "DB_MANAGED_LOCATION_URI", "TYPE", "DATACONNECTOR_NAME", "REMOTE_DBNAME"FROM "DBS" where "NAME" = ? and "CTLG_NAME" = ?" Review Comment: I'm a little afraid that it will generate many `Query` logs to the original though. Issue Time Tracking ------------------- Worklog Id: (was: 798346) Time Spent: 1h (was: 50m) > 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: 1h > 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)