[ 
https://issues.apache.org/jira/browse/HIVE-22866?focusedWorklogId=388279&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-388279
 ]

ASF GitHub Bot logged work on HIVE-22866:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Feb/20 09:28
            Start Date: 17/Feb/20 09:28
    Worklog Time Spent: 10m 
      Work Description: miklosgergely commented on pull request #902: 
HIVE-22866 schq testcases
URL: https://github.com/apache/hive/pull/902#discussion_r380030665
 
 

 ##########
 File path: ql/src/test/queries/clientpositive/schq_ingest.q
 ##########
 @@ -0,0 +1,44 @@
+--! qt:authorizer
+--! qt:scheduledqueryservice
+--! qt:sysdb
+
+set user.name=hive_admin_user;
+set role admin;
+
+drop table if exists t;
+drop table if exists s;
+ 
+-- suppose that this table is an external table or something
+-- which supports the pushdown of filter condition on the id column
+create table s(id integer, cnt integer);
+ 
+-- create an internal table and an offset table
+create table t(id integer, cnt integer);
+create table t_offset(offset integer);
+insert into t_offset values(0);
+ 
+-- pretend that data is added to s
+insert into s values(1,1);
+ 
+-- run an ingestion...
+from (select id==offset as first,* from s
+join t_offset on id>=offset) s1
+insert into t select id,cnt where first = false
+insert overwrite table t_offset select max(s1.id);
+ 
+-- configure to run ingestion every 10 minutes
+create scheduled query ingest every 10 minutes defined as
+from (select id==offset as first,* from s
+join t_offset on id>=offset) s1
+insert into t select id,cnt where first = false
+insert overwrite table t_offset select max(s1.id);
+ 
+-- add some new values
+insert into s values(2,2),(3,3);
+ 
+-- pretend that a timeout have happened
+alter scheduled query ingest execute;
+
+!sleep 3;
 
 Review comment:
   check if table t contains the appropritate data
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 388279)
    Time Spent: 20m  (was: 10m)

> Add more testcases for scheduled queries
> ----------------------------------------
>
>                 Key: HIVE-22866
>                 URL: https://issues.apache.org/jira/browse/HIVE-22866
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-22866.01.patch, HIVE-22866.02.patch, 
> HIVE-22866.03.patch
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> the examples in the wiki should be added as test cases



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to