hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liyunzhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-17973) Fix small bug in multi_insert_union_src.q
Date Wed, 08 Nov 2017 08:04:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-17973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16243500#comment-16243500
] 

liyunzhang commented on HIVE-17973:
-----------------------------------

for sysdb.q.out, the modification is like following, {{CREATE TABLE IF NOT EXISTS `WM_TRIGGERS`}}
should exist in sysdb.q.out because {{hive-schema-3.0.0.hive.sql}} is sourced in [sysdb.q|https://github.com/apache/hive/blob/master/ql/src/test/queries/clientpositive/sysdb.q#L27]
and [hive-schema-3.0.0.hive.sql| https://github.com/apache/hive/blob/master/metastore/scripts/upgrade/hive/hive-schema-3.0.0.hive.sql#L967]
create table {{WM_TRIGGERS}} . Very confused why before HiveQA did not throw error.
{code}
--- a/ql/src/test/results/clientpositive/llap/sysdb.q.out
+++ b/ql/src/test/results/clientpositive/llap/sysdb.q.out
@@ -2225,6 +2225,56 @@ FROM
 POSTHOOK: type: CREATETABLE
 POSTHOOK: Output: SYS@WM_RESOURCEPLANS
 POSTHOOK: Output: database:sys
+PREHOOK: query: CREATE TABLE IF NOT EXISTS `WM_TRIGGERS` (
+  `RP_NAME` string,
+  `NAME` string,
+  `TRIGGER_EXPRESSION` string,
+  `ACTION_EXPRESSION` string
+)
+STORED BY 'org.apache.hive.storage.jdbc.JdbcStorageHandler'
+TBLPROPERTIES (
+"hive.sql.database.type" = "METASTORE",
+"hive.sql.query" =
+"SELECT
+  r.NAME RP_NAME,
+  t.NAME NAME,
+  TRIGGER_EXPRESSION,
+  ACTION_EXPRESSION
+FROM
+  WM_TRIGGER t
+JOIN
+  WM_RESOURCEPLAN r
+ON
                                    
{code}

> Fix small bug in multi_insert_union_src.q
> -----------------------------------------
>
>                 Key: HIVE-17973
>                 URL: https://issues.apache.org/jira/browse/HIVE-17973
>             Project: Hive
>          Issue Type: Bug
>            Reporter: liyunzhang
>            Assignee: liyunzhang
>            Priority: Trivial
>         Attachments: HIVE-17973.2.patch, HIVE-17973.2.patch, HIVE-17973.patch, HVIE-17973.3.patch
>
>
> in ql\src\test\queries\clientpositive\multi_insert_union_src.q, 
> There are two problems in the query file
>  1.  It is strange to drop src_multi1 twice 
>  2. {{src1}} is not created but used src1(Maybe we create src1 in other qfile)
> {code}
> set hive.mapred.mode=nonstrict;
> drop table if exists src2;
> drop table if exists src_multi1;
> drop table if exists src_multi1;
> set hive.stats.dbclass=fs;
> CREATE TABLE src2 as SELECT * FROM src;
> create table src_multi1 like src;
> create table src_multi2 like src;
> explain
> from (select * from src1 where key < 10 union all select * from src2 where key >
100) s
> insert overwrite table src_multi1 select key, value where key < 150 order by key
> insert overwrite table src_multi2 select key, value where key > 400 order by value;
> from (select * from src1 where key < 10 union all select * from src2 where key >
100) s
> insert overwrite table src_multi1 select key, value where key < 150 order by key
> insert overwrite table src_multi2 select key, value where key > 400 order by value;
> select * from src_multi1;
> select * from src_multi2;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message