This is an automated email from the ASF dual-hosted git repository.

tchoi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new 277f2431a8c HIVE-26415 : Add epoch time in the 
information_schema.scheduled_executions view (#3467)
277f2431a8c is described below

commit 277f2431a8cb77e6473a62936cbca479221189b8
Author: shreenidhiSaigaonkar 
<98075562+shreenidhisaigaon...@users.noreply.github.com>
AuthorDate: Fri Aug 19 08:49:31 2022 +0530

    HIVE-26415 : Add epoch time in the information_schema.scheduled_executions 
view (#3467)
    
    HIVE-26415 : Add epoch time in the information_schema.scheduled_executions 
view (Shreenidhi Saigaonkar, reviewed by Teddy Choi)
---
 .../upgrade/hive/hive-schema-4.0.0-alpha-2.hive.sql |  3 ++-
 .../upgrade-4.0.0-alpha-1-to-4.0.0-alpha-2.hive.sql | 21 +++++++++++++++++++++
 ql/src/test/results/clientpositive/llap/sysdb.q.out |  1 +
 3 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-2.hive.sql 
b/metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-2.hive.sql
index f6dd0af61a0..c1d16486a53 100644
--- a/metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-2.hive.sql
+++ b/metastore/scripts/upgrade/hive/hive-schema-4.0.0-alpha-2.hive.sql
@@ -1980,7 +1980,8 @@ SELECT
   FROM_UNIXTIME(END_TIME) as END_TIME,
   END_TIME-START_TIME as ELAPSED,
   ERROR_MESSAGE,
-  FROM_UNIXTIME(LAST_UPDATE_TIME) AS LAST_UPDATE_TIME
+  FROM_UNIXTIME(LAST_UPDATE_TIME) AS LAST_UPDATE_TIME,
+  START_TIME as START_TIME_SINCE_EPOCH
 FROM
   SYS.SCHEDULED_EXECUTIONS SE
 JOIN
diff --git 
a/metastore/scripts/upgrade/hive/upgrade-4.0.0-alpha-1-to-4.0.0-alpha-2.hive.sql
 
b/metastore/scripts/upgrade/hive/upgrade-4.0.0-alpha-1-to-4.0.0-alpha-2.hive.sql
index 73d9a5234d7..ac520136821 100644
--- 
a/metastore/scripts/upgrade/hive/upgrade-4.0.0-alpha-1-to-4.0.0-alpha-2.hive.sql
+++ 
b/metastore/scripts/upgrade/hive/upgrade-4.0.0-alpha-1-to-4.0.0-alpha-2.hive.sql
@@ -210,4 +210,25 @@ SELECT
   CQ_TBLPROPERTIES
 FROM COMPACTION_QUEUE;
 
+USE INFORMATION_SCHEMA;
+
+create or replace view SCHEDULED_EXECUTIONS as
+SELECT
+  SCHEDULED_EXECUTION_ID,
+  SCHEDULE_NAME,
+  EXECUTOR_QUERY_ID,
+  `STATE`,
+  FROM_UNIXTIME(START_TIME) as START_TIME,
+  FROM_UNIXTIME(END_TIME) as END_TIME,
+  END_TIME-START_TIME as ELAPSED,
+  ERROR_MESSAGE,
+  FROM_UNIXTIME(LAST_UPDATE_TIME) AS LAST_UPDATE_TIME,
+  START_TIME as START_TIME_SINCE_EPOCH
+FROM
+  SYS.SCHEDULED_EXECUTIONS SE
+JOIN
+  SYS.SCHEDULED_QUERIES SQ
+WHERE
+  SE.SCHEDULED_QUERY_ID=SQ.SCHEDULED_QUERY_ID;
+
 SELECT 'Finished upgrading MetaStore schema from 4.0.0-alpha-1 to 
4.0.0-alpha-2';
diff --git a/ql/src/test/results/clientpositive/llap/sysdb.q.out 
b/ql/src/test/results/clientpositive/llap/sysdb.q.out
index d2bf198a4ad..6dcdd595e3b 100644
--- a/ql/src/test/results/clientpositive/llap/sysdb.q.out
+++ b/ql/src/test/results/clientpositive/llap/sysdb.q.out
@@ -773,6 +773,7 @@ scheduled_executions        scheduled_execution_id
 scheduled_executions   scheduled_query_id
 scheduled_executions   start_time
 scheduled_executions   start_time
+scheduled_executions   start_time_since_epoch
 scheduled_executions   state
 scheduled_executions   state
 scheduled_queries      active_execution_id

Reply via email to