hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Work logged] (HIVE-12971) Hive Support for Kudu
Date Thu, 25 Jul 2019 16:47:01 GMT

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

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

                Author: ASF GitHub Bot
            Created on: 25/Jul/19 16:46
            Start Date: 25/Jul/19 16:46
    Worklog Time Spent: 10m 
      Work Description: granthenke commented on pull request #733: HIVE-12971: Add Support
for Kudu Tables
URL: https://github.com/apache/hive/pull/733#discussion_r307397302
 
 

 ##########
 File path: kudu-handler/src/test/queries/positive/kudu_queries.q
 ##########
 @@ -0,0 +1,148 @@
+--! qt:dataset:src
+
+-- Create table specifying columns.
+-- Note: Kudu is the source of truth for schema.
+DROP TABLE IF EXISTS kv_table;
+CREATE EXTERNAL TABLE kv_table(key int, value string)
+STORED BY 'org.apache.hadoop.hive.kudu.KuduStorageHandler'
+TBLPROPERTIES ("kudu.table_name" = "default.kudu_kv");
+
+DESCRIBE EXTENDED kv_table;
+
+-- Verify INSERT support.
+INSERT INTO TABLE kv_table VALUES
+(1, "1"), (2, "2");
+
+SELECT * FROM kv_table;
+SELECT count(*) FROM kv_table;
+SELECT count(*) FROM kv_table LIMIT 1;
+SELECT count(1) FROM kv_table;
+
+-- Verify projection and case insensitivity.
+SELECT kEy FROM kv_table;
+
+DROP TABLE kv_table;
+
+-- Create table without specifying columns.
+-- Note: Kudu is the source of truth for schema.
+DROP TABLE IF EXISTS all_types_table;
+CREATE EXTERNAL TABLE all_types_table
+STORED BY 'org.apache.hadoop.hive.kudu.KuduStorageHandler'
+TBLPROPERTIES ("kudu.table_name" = "default.kudu_all_types");
+
+DESCRIBE EXTENDED all_types_table;
+
+INSERT INTO TABLE all_types_table VALUES
+(1, 1, 1, 1, true, 1.1, 1.1, "one", 'one', '2011-11-11 11:11:11', 1.111, null, 1),
+(2, 2, 2, 2, false, 2.2, 2.2, "two", 'two', '2012-12-12 12:12:12', 2.222, null, 2);
+
+SELECT * FROM all_types_table;
+SELECT count(*) FROM all_types_table;
+
+-- Verify comparison predicates on byte.
+SELECT key FROM all_types_table WHERE key = 1;
+SELECT key FROM all_types_table WHERE key != 1;
+SELECT key FROM all_types_table WHERE key > 1;
+SELECT key FROM all_types_table WHERE key >= 1;
+SELECT key FROM all_types_table WHERE key < 2;
+SELECT key FROM all_types_table WHERE key <= 2;
+
+-- Verify comparison predicates on short.
+SELECT key FROM all_types_table WHERE int16 = 1;
+SELECT key FROM all_types_table WHERE int16 != 1;
+SELECT key FROM all_types_table WHERE int16 > 1;
+SELECT key FROM all_types_table WHERE int16 >= 1;
+SELECT key FROM all_types_table WHERE int16 < 2;
+SELECT key FROM all_types_table WHERE int16 <= 2;
+
+-- Verify comparison predicates on int.
+SELECT key FROM all_types_table WHERE int32 = 1;
+SELECT key FROM all_types_table WHERE int32 != 1;
+SELECT key FROM all_types_table WHERE int32 > 1;
+SELECT key FROM all_types_table WHERE int32 >= 1;
+SELECT key FROM all_types_table WHERE int32 < 2;
+SELECT key FROM all_types_table WHERE int32 <= 2;
+
+-- Verify comparison predicates on long.
+SELECT key FROM all_types_table WHERE int64 = 1;
+SELECT key FROM all_types_table WHERE int64 != 1;
+SELECT key FROM all_types_table WHERE int64 > 1;
+SELECT key FROM all_types_table WHERE int64 >= 1;
+SELECT key FROM all_types_table WHERE int64 < 2;
+SELECT key FROM all_types_table WHERE int64 <= 2;
+
+-- Verify comparison predicates on boolean.
+SELECT key FROM all_types_table WHERE bool = true;
+SELECT key FROM all_types_table WHERE bool != true;
+SELECT key FROM all_types_table WHERE bool > true;
+SELECT key FROM all_types_table WHERE bool >= true;
+SELECT key FROM all_types_table WHERE bool < false;
+SELECT key FROM all_types_table WHERE bool <= false;
+
+-- Verify comparison predicates on string.
+-- Note: string is escaped because it's a reserved word.
+SELECT key FROM all_types_table WHERE `string` = "one";
+SELECT key FROM all_types_table WHERE `string` != "one";
+SELECT key FROM all_types_table WHERE `string` > "one";
+SELECT key FROM all_types_table WHERE `string` >= "one";
+SELECT key FROM all_types_table WHERE `string` < "two";
+SELECT key FROM all_types_table WHERE `string` <= "two";
+
+-- Verify comparison predicates on binary.
+-- Note: binary is escaped because it's a reserved word.
+SELECT key FROM all_types_table WHERE `binary` = cast ('one' as binary);
+SELECT key FROM all_types_table WHERE `binary` != cast ('one' as binary);
+SELECT key FROM all_types_table WHERE `binary` > cast ('one' as binary);
+SELECT key FROM all_types_table WHERE `binary` >= cast ('one' as binary);
+SELECT key FROM all_types_table WHERE `binary` < cast ('two' as binary);
+SELECT key FROM all_types_table WHERE `binary` <= cast ('two' as binary);
+
+-- Verify comparison predicates on timestamp.
+-- Note: timestamp is escaped because it's a reserved word.
+SELECT key FROM all_types_table WHERE `timestamp` = '2011-11-11 11:11:11';
+SELECT key FROM all_types_table WHERE `timestamp` != '2011-11-11 11:11:11';
+SELECT key FROM all_types_table WHERE `timestamp` > '2011-11-11 11:11:11';
+SELECT key FROM all_types_table WHERE `timestamp` >= '2011-11-11 11:11:11';
+SELECT key FROM all_types_table WHERE `timestamp` < '2012-12-12 12:12:12';
+SELECT key FROM all_types_table WHERE `timestamp` <= '2012-12-12 12:12:12';
+
+-- Verify comparison predicates on decimal.
+-- Note: decimal is escaped because it's a reserved word.
+SELECT key FROM all_types_table WHERE `decimal` = 1.111;
+SELECT key FROM all_types_table WHERE `decimal` != 1.111;
+SELECT key FROM all_types_table WHERE `decimal` > 1.111;
+SELECT key FROM all_types_table WHERE `decimal` >= 1.111;
+SELECT key FROM all_types_table WHERE `decimal` < 2.222;
+SELECT key FROM all_types_table WHERE `decimal` <= 2.222;
+
+-- Verify null predicates.
+SELECT key FROM all_types_table WHERE null IS NOT NULL;
+SELECT key FROM all_types_table WHERE null IS NULL;
+
+-- Verify AND predicates.
+SELECT key FROM all_types_table WHERE null IS NULL AND key > 1;
+SELECT key FROM all_types_table WHERE null IS NULL AND key >= 1;
+
+-- Verify OR predicates.
+SELECT key FROM all_types_table WHERE key = 1 OR `string` = "one";
+SELECT key FROM all_types_table WHERE key = 1 OR `string` = "two";
+
+-- Verify various other filters.
+SELECT key FROM all_types_table WHERE string IN ("one", "missing");
+SELECT key FROM all_types_table WHERE string NOT IN ("one", "missing");
+SELECT key FROM all_types_table WHERE key BETWEEN -1 and 1;
+SELECT key FROM all_types_table WHERE `string` LIKE "%n%";
+
 
 Review comment:
   I added a couple queries with join, group by, and order by.
 
----------------------------------------------------------------
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:
users@infra.apache.org


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

    Worklog Id:     (was: 282761)
    Time Spent: 3h 50m  (was: 3h 40m)

> Hive Support for Kudu
> ---------------------
>
>                 Key: HIVE-12971
>                 URL: https://issues.apache.org/jira/browse/HIVE-12971
>             Project: Hive
>          Issue Type: New Feature
>    Affects Versions: 2.0.0
>            Reporter: Lenni Kuff
>            Assignee: Grant Henke
>            Priority: Major
>              Labels: pull-request-available
>         Attachments: HIVE-12971.0.patch, HIVE-12971.1.patch, HIVE-12971.2.patch, HIVE-12971.3.patch,
HIVE-12971.4.patch
>
>          Time Spent: 3h 50m
>  Remaining Estimate: 0h
>
> JIRA for tracking work related to Hive/Kudu integration.
> It would be useful to allow Kudu data to be accessible via Hive. This would involve creating
a Kudu SerDe/StorageHandler and implementing support for QUERY and DML commands like SELECT,
INSERT, UPDATE, and DELETE. Kudu Input/OutputFormats classes already exist. The work can be
staged to support this functionality incrementally.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message