Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hive 1.1.0 tez hadoop oracle NULL sort

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Recently, it was found that there were a lot of bug when hive 0.14 was running on tez, and decided to upgrade hive to hive 1.1.0, because the cluster hadoop version was 2.3.0 and accidentally stepped on the pit:

1. Hive 1.1.0 requires above jdk1.7

2. Set the environment variable HADOOP_USER_CLASSPATH_FIRST= "true"

3. Https://issues.apache.org/jira/browse/HIVE-9957 type this patch, and this patch will be integrated in hive1.2.0. Hive-shims-0.23-1.1.0.jar was replaced after compiling the hive 1.1.0 source code. Finally, remember to replace Hadoop23Shims.class in hive-exec-1.1.0.jar.

In addition, for the sorting of NULL, hive is different from oracle. For the following SQL:

SELECT

T.chanl_id

T.date_id

T.pltfm_id

T.prov_id

T.old_mbr_num

ROW_NUMBER () OVER (partition by t.date_id ORDER BY t.old_mbr_num) ROW_NUMBER

FROM

Data t

The execution result of Oracle is as follows:

56859 2015-02-15 1 1 449 1

56859 2015-02-15 1 1 6869 2

56859 2015-02-15 1 1 7047 3

56859 2015-02-15 1 1 8628 4

56859 2015-02-15 11 11804 5

56859 2015-02-15 1 1 12089 6

56859 2015-02-15 1 1 18778 7

56859 2015-02-15 1 1 25906 8

.

56859 2015-02-15 11 191046115 939

56859 2015-02-15 1 1 NULL 940

56859 2015-02-15 1 1 NULL 941

56859 2015-02-15 1 1 NULL 942

56859 2015-02-15 1 1 NULL 943

The execution result of Hive is as follows:

0 56859 2015-02-15 1 1 NULL 1

1 56859 2015-02-15 1 1 NULL 2

2 56859 2015-02-15 1 1 NULL 3

3 56859 2015-02-15 1 1 NULL 4

4 56859 2015-02-15 1 1 449 5

5 56859 2015-02-15 1 1 6869 6

6 56859 2015-02-15 1 1 7047 7

7 56859 2015-02-15 1 1 8628 8

8 56859 2015-02-15 11 11804 9

It can be seen that the ordering of NULL is not the same.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report