Return-Path: X-Original-To: apmail-hive-commits-archive@www.apache.org Delivered-To: apmail-hive-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CBFA218635 for ; Fri, 26 Jun 2015 03:42:03 +0000 (UTC) Received: (qmail 29516 invoked by uid 500); 26 Jun 2015 03:41:56 -0000 Delivered-To: apmail-hive-commits-archive@hive.apache.org Received: (qmail 29384 invoked by uid 500); 26 Jun 2015 03:41:56 -0000 Mailing-List: contact commits-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hive.apache.org Delivered-To: mailing list commits@hive.apache.org Received: (qmail 26502 invoked by uid 99); 26 Jun 2015 03:41:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Jun 2015 03:41:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1750AE36B6; Fri, 26 Jun 2015 03:41:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: xuefu@apache.org To: commits@hive.apache.org Date: Fri, 26 Jun 2015 03:42:44 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [51/53] [abbrv] hive git commit: HIVE-11051: Hive 1.2.0 MapJoin w/Tez - LazyBinaryArray cannot be cast to [Ljava.lang.Object; (Matt McCline via Gopal V) HIVE-11051: Hive 1.2.0 MapJoin w/Tez - LazyBinaryArray cannot be cast to [Ljava.lang.Object; (Matt McCline via Gopal V) Project: http://git-wip-us.apache.org/repos/asf/hive/repo Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/2a77e87e Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/2a77e87e Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/2a77e87e Branch: refs/heads/beeline-cli Commit: 2a77e87e347d368a806c53df5f5ac709339a47bc Parents: 63deec4 Author: Gunther Hagleitner Authored: Thu Jun 25 10:40:46 2015 -0700 Committer: Gunther Hagleitner Committed: Thu Jun 25 10:40:46 2015 -0700 ---------------------------------------------------------------------- data/files/ct_events_clean.txt | 76 + data/files/service_request_clean.txt | 76 + .../test/resources/testconfiguration.properties | 1 + .../persistence/HybridHashTableContainer.java | 32 +- .../persistence/MapJoinBytesTableContainer.java | 70 +- .../clientpositive/tez_join_result_complex.q | 139 ++ .../tez/tez_join_result_complex.q.out | 2159 ++++++++++++++++++ .../tez_join_result_complex.q.out | 1337 +++++++++++ 8 files changed, 3881 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hive/blob/2a77e87e/data/files/ct_events_clean.txt ---------------------------------------------------------------------- diff --git a/data/files/ct_events_clean.txt b/data/files/ct_events_clean.txt new file mode 100644 index 0000000..5cf5b0d --- /dev/null +++ b/data/files/ct_events_clean.txt @@ -0,0 +1,76 @@ +002246948195 2015-04-24 12:48:01.0 2015-04-24 12:53:46.874198 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002239795904 2015-04-20 13:17:40.0 2015-04-20 13:44:06.408995 001 007 CALL IN 100 1 NULL +002245333855 2015-04-23 12:20:08.0 2015-04-23 12:22:22.953697 001 007 CALL IN 100 1 NULL +002220195330 2015-03-27 16:02:46.0 2015-03-27 16:08:58.852168 001 007 CALL IN 100 1 ["Network Pharmacy Assistance Line: 2663."] +002237527045 2015-04-16 12:21:45.0 2015-04-16 22:17:05.239032 001 007 CALL IN 100 1 ["trans to part d"] +002246948195 2015-04-24 12:48:01.0 2015-04-24 12:53:46.874198 001 007 CALL IN 100 1 NULL +002219988144 2015-03-27 14:38:45.0 2015-03-27 15:03:00.478091 001 007 CALL IN 100 1 NULL +002237527045 2015-04-16 12:21:45.0 2015-04-16 22:17:05.239032 001 007 CALL IN 100 1 ["trans to part d"] +002247005359 2015-04-24 13:19:44.0 2015-04-24 22:26:24.070143 001 007 CALL IN 100 1 ["medication questions"] +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002237527045 2015-04-16 12:21:45.0 2015-04-16 22:17:05.239032 001 007 CALL IN 100 1 ["trans to part d"] +002245467256 2015-04-23 13:31:03.0 2015-04-23 13:39:54.686797 001 007 CALL IN 100 1 NULL +002273726300 2015-05-18 15:41:52.0 2015-05-18 15:54:01.747478 001 007 CALL IN 100 1 NULL +002219988144 2015-03-27 14:38:45.0 2015-03-27 15:03:00.478091 001 007 CALL IN 100 1 NULL +002273726300 2015-05-18 15:41:52.0 2015-05-18 15:54:01.747478 001 007 CALL IN 100 1 NULL +002245243791 2015-04-23 11:36:25.0 2015-04-23 22:23:09.553824 001 007 CALL IN 100 1 ["mm was warm transf to specialty pharmacy also provided mm with the number spoke to isa"] +002247005359 2015-04-24 13:19:44.0 2015-04-24 22:26:24.070143 001 007 CALL IN 100 1 ["medication questions"] +002245243791 2015-04-23 11:36:25.0 2015-04-23 22:23:09.553824 001 007 CALL IN 100 1 ["mm was warm transf to specialty pharmacy also provided mm with the number spoke to isa"] +002245243791 2015-04-23 11:36:25.0 2015-04-23 22:23:09.553824 001 007 CALL IN 100 1 ["mm was warm transf to specialty pharmacy also provided mm with the number spoke to isa"] +002245282386 2015-04-23 11:53:52.0 2015-04-23 22:14:01.288132 001 007 CALL IN 100 1 ["questions about his coverage and getting it from pharmacy, xfered to part D"] +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002235599616 2015-04-14 15:02:09.0 2015-04-14 15:10:01.223941 001 007 CALL IN 100 1 NULL +002245467256 2015-04-23 13:31:03.0 2015-04-23 13:39:54.686797 001 007 CALL IN 100 1 NULL +002246948195 2015-04-24 12:48:01.0 2015-04-24 12:53:46.874198 001 007 CALL IN 100 1 NULL +002245467256 2015-04-23 13:31:03.0 2015-04-23 13:39:54.686797 001 007 CALL IN 100 1 NULL +002247005359 2015-04-24 13:19:44.0 2015-04-24 22:26:24.070143 001 007 CALL IN 100 1 ["medication questions"] +002245282386 2015-04-23 11:53:52.0 2015-04-23 22:14:01.288132 001 007 CALL IN 100 1 ["questions about his coverage and getting it from pharmacy, xfered to part D"] +002219988144 2015-03-27 14:38:45.0 2015-03-27 15:03:00.478091 001 007 CALL IN 100 1 NULL +002239795904 2015-04-20 13:17:40.0 2015-04-20 13:44:06.408995 001 007 CALL IN 100 1 NULL +002245333855 2015-04-23 12:20:08.0 2015-04-23 12:22:22.953697 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002267582534 2015-05-12 11:19:51.0 2015-05-12 11:26:26.922031 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002246948195 2015-04-24 12:48:01.0 2015-04-24 12:53:46.874198 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002283483949 2015-05-28 11:26:51.0 2015-05-28 11:45:43.043173 001 007 CALL IN 100 1 NULL +002245282386 2015-04-23 11:53:52.0 2015-04-23 22:14:01.288132 001 007 CALL IN 100 1 ["questions about his oxycodone coverage and getting it from pharmacy, xfered to part D"] +002239795904 2015-04-20 13:17:40.0 2015-04-20 13:44:06.408995 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002248196142 2015-04-26 14:06:57.0 2015-04-26 14:20:57.615901 001 007 CALL IN 100 1 NULL +002237527045 2015-04-16 12:21:45.0 2015-04-16 22:17:05.239032 001 007 CALL IN 100 1 ["trans to part d"] +002267582534 2015-05-12 11:19:51.0 2015-05-12 11:26:26.922031 001 007 CALL IN 100 1 NULL +002245243791 2015-04-23 11:36:25.0 2015-04-23 22:23:09.553824 001 007 CALL IN 100 1 ["mm was warm transf to specialty pharmacy also provided mm with the number spoke to isa"] +002239795904 2015-04-20 13:17:40.0 2015-04-20 13:44:06.408995 001 007 CALL IN 100 1 NULL +002235599616 2015-04-14 15:02:09.0 2015-04-14 15:10:01.223941 001 007 CALL IN 100 1 NULL +002245333855 2015-04-23 12:20:08.0 2015-04-23 12:22:22.953697 001 007 CALL IN 100 1 NULL +002273726300 2015-05-18 15:41:52.0 2015-05-18 15:54:01.747478 001 007 CALL IN 100 1 NULL +002250650385 2015-04-28 11:12:30.0 2015-04-28 11:19:52.499187 001 007 CALL IN 100 1 NULL +002235599616 2015-04-14 15:02:09.0 2015-04-14 15:10:01.223941 001 007 CALL IN 100 1 NULL +002250650385 2015-04-28 11:12:30.0 2015-04-28 11:19:52.499187 001 007 CALL IN 100 1 NULL +002207463467 2015-03-18 11:14:28.0 2015-03-18 11:17:31.458612 001 007 CALL IN 100 1 NULL +002245467256 2015-04-23 13:31:03.0 2015-04-23 13:39:54.686797 001 007 CALL IN 100 1 NULL +002245467256 2015-04-23 13:31:03.0 2015-04-23 13:39:54.686797 001 007 CALL IN 100 1 NULL +002207463467 2015-03-18 11:14:28.0 2015-03-18 11:17:31.458612 001 007 CALL IN 100 1 NULL \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hive/blob/2a77e87e/data/files/service_request_clean.txt ---------------------------------------------------------------------- diff --git a/data/files/service_request_clean.txt b/data/files/service_request_clean.txt new file mode 100644 index 0000000..8c2197a --- /dev/null +++ b/data/files/service_request_clean.txt @@ -0,0 +1,76 @@ +002246948195 0000003629537980 2015-04-24 12:48:37.859683 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-24 12:48:37.859683 NULL 2015-04-24 12:48:40.499238 1 NULL +002248196142 0000003631128809 2015-04-26 14:19:35.002766 1 HMOM1 RM 001 D02 007 648 001 001 N N null 12 Pharmacy_Inquiry NULL NULL 2015-04-26 14:19:35.002766 NULL 2015-04-26 14:19:38.159742 1 ["the mm is calling in regards to pharmacy is par with aetna. adv the mm i am unable to find them in the system."] +002248196142 0000003631128809 2015-04-26 14:19:35.002766 1 HMOM1 RM 001 D02 007 648 001 001 N N null 12 Pharmacy_Inquiry NULL NULL 2015-04-26 14:19:35.002766 NULL 2015-04-26 14:19:38.159742 1 ["the mm is calling in regards to pharmacy is par with aetna. adv the mm i am unable to find them in the system."] +002283483949 0000003680733027 2015-05-28 11:27:54.600648 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:27:54.600648 NULL 2015-05-28 11:27:57.007121 1 NULL +002283483949 0000003680733027 2015-05-28 11:27:54.600648 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:27:54.600648 NULL 2015-05-28 11:27:57.007121 1 NULL +002283483949 0000003680733027 2015-05-28 11:27:54.600648 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:27:54.600648 NULL 2015-05-28 11:27:57.007121 1 NULL +002283483949 0000003680733027 2015-05-28 11:27:54.600648 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:27:54.600648 NULL 2015-05-28 11:27:57.007121 1 NULL +002239795904 0000003619841753 2015-04-20 13:30:15.011249 2 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-04-20 13:31:12.458513 NULL 2015-04-20 13:30:17.82283 1 NULL +002245333855 0000003627296864 2015-04-23 12:20:37.180286 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-23 12:20:37.95428 NULL 2015-04-23 12:20:42.064108 1 NULL +002220195330 0000003589889320 2015-03-27 16:03:54.412005 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-03-27 16:03:54.412005 NULL 2015-03-27 16:03:57.349136 1 NULL +002237527045 0000003616212332 2015-04-16 12:22:10.0135 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-16 22:17:05.239032 NULL 2015-04-16 12:22:14.686573 1 NULL +002246948195 0000003629552417 2015-04-24 12:53:42.626144 1 HMOM1 RM 001 D02 007 311 001 001 N N null 2 Benefit_Inquiry NULL NULL 2015-04-24 12:53:42.626144 NULL 2015-04-24 12:53:43.811111 1 ["transferred mm to correct dept pharmacy"] +002219988144 0000003589680227 2015-03-27 15:02:02.445509 1 HMOM1 RM 001 D02 007 648 H51 001 N N null NULL NULL NULL NULL 2015-03-27 15:02:02.445509 NULL 2015-03-27 15:02:03.890719 1 ["Mbr got a call stating his phcy phcy will no longer par as of 03/31/15 and wanted to know why. Transferred to Network Pharmacy Assistance Line: spoke to adv mbr wanted to know why he cannot go to the phcy anymore. Adv mbr may want to speak to part d after regarding a med that phcy can only get for him."] +002237527045 0000003616216229 2015-04-16 12:23:15.264709 1 HMOM1 RM 001 D02 007 357 511 001 N N null 10 Health_Care_Access_Inquiry NULL NULL 2015-04-16 22:17:05.239032 NULL 2015-04-16 12:23:17.268762 1 ["advised memthat he needs referrals"] +002247005359 0000003629627672 2015-04-24 13:21:31.741349 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-24 22:26:24.070143 NULL 2015-04-24 13:21:33.10773 1 NULL +002248196142 0000003631128825 2015-04-26 14:19:54.917599 1 HMOM1 RM 001 D02 007 648 389 001 N N null 12 Pharmacy_Inquiry NULL [" "] 2015-04-26 14:19:54.917599 NULL 2015-04-26 14:20:00.0232 1 NULL +002248196142 0000003631128825 2015-04-26 14:19:54.917599 1 HMOM1 RM 001 D02 007 648 389 001 N N null 12 Pharmacy_Inquiry NULL [" "] 2015-04-26 14:19:54.917599 NULL 2015-04-26 14:20:00.0232 1 NULL +002237527045 0000003616212506 2015-04-16 12:22:12.913755 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-16 22:17:05.239032 NULL 2015-04-16 12:22:14.803557 1 NULL +002245467256 0000003627505176 2015-04-23 13:31:59.591838 1 HMOM1 RM 001 D01 007 648 389 001 Y N null 12 Pharmacy_Inquiry NULL [" "] 2015-04-23 13:31:59.591838 NULL 2015-04-23 13:32:03.630355 1 NULL +002273726300 0000003666781031 2015-05-18 15:44:00.459007 1 HMOM1 RM 001 D01 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-05-18 15:44:00.459007 NULL 2015-05-18 15:44:03.180889 1 NULL +002219988144 0000003589600435 2015-03-27 14:39:19.290181 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-03-27 14:39:19.290181 NULL 2015-03-27 14:39:21.981441 1 NULL +002273726300 0000003666810982 2015-05-18 15:52:30.865779 1 HMOM1 RM 001 D01 007 311 008 001 Y N null 2 Benefit_Inquiry NULL [" "] 2015-05-18 15:52:30.865779 NULL 2015-05-18 15:52:35.677654 1 NULL +002245243791 0000003627158688 2015-04-23 11:37:15.024552 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-23 22:23:09.553824 NULL 2015-04-23 11:37:20.417 1 NULL +002247005359 0000003629633814 2015-04-24 13:23:41.76024 1 HMOM1 RM 001 D02 007 311 001 001 N N null 2 Benefit_Inquiry NULL NULL 2015-04-24 22:26:24.070143 NULL 2015-04-24 13:23:43.825964 1 ["mm is calling about advised mm that i will get him to part d."] +002245243791 0000003627159160 2015-04-23 11:37:23.404577 1 HMOM1 RM 001 D02 007 365 164 001 Y N null 11 Mbr_plan_info_upd_Inquiry NULL [" "] 2015-04-23 22:23:09.553824 NULL 2015-04-23 11:37:26.54188 1 NULL +002245243791 0000003627158875 2015-04-23 11:37:18.418903 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-23 22:23:09.553824 NULL 2015-04-23 11:37:20.945151 1 NULL +002245282386 0000003627217469 2015-04-23 11:54:42.446098 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-23 22:14:01.288132 NULL 2015-04-23 11:54:46.190323 1 NULL +002248196142 0000003631128067 2015-04-26 14:09:56.995915 1 HMOM1 RM 001 D02 007 354 001 001 Y N null 14 Provider_Inquiry NULL [" "] 2015-04-26 14:14:25.299544 NULL 2015-04-26 14:10:01.261951 1 NULL +002248196142 0000003631128067 2015-04-26 14:09:56.995915 1 HMOM1 RM 001 D02 007 354 001 001 Y N null 14 Provider_Inquiry NULL [" "] 2015-04-26 14:14:25.299544 NULL 2015-04-26 14:10:01.261951 1 NULL +002235599616 0000003613165874 2015-04-14 15:03:14.605977 1 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-04-14 15:03:14.605977 NULL 2015-04-14 15:03:16.452358 1 NULL +002245467256 0000003627503418 2015-04-23 13:31:23.776941 1 HMOM1 RM 001 D01 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-23 13:31:23.776941 NULL 2015-04-23 13:31:25.966957 1 NULL +002246948195 0000003629538117 2015-04-24 12:48:40.945176 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-24 12:48:40.945176 NULL 2015-04-24 12:48:45.466891 1 NULL +002245467256 0000003627527570 2015-04-23 13:39:49.295025 1 HMOM1 RM 001 D01 007 648 369 001 N N null 12 Pharmacy_Inquiry NULL NULL 2015-04-23 13:39:49.295025 NULL 2015-04-23 13:39:54.922156 1 ["mm called about pharm not being in network, offered other pharmaces from . gave if pharm wants to be contracted"] +002247005359 0000003629627781 2015-04-24 13:21:34.419178 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-24 22:26:24.070143 NULL 2015-04-24 13:21:38.070006 1 NULL +002245282386 0000003627217646 2015-04-23 11:54:45.519105 1 HMOM1 RM 001 D02 007 648 389 001 Y N null 12 Pharmacy_Inquiry NULL [" "] 2015-04-23 22:14:01.288132 NULL 2015-04-23 11:54:51.129791 1 NULL +002219988144 0000003589629166 2015-03-27 14:47:25.274287 1 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-03-27 14:47:25.274287 NULL 2015-03-27 14:47:27.516359 1 NULL +002239795904 0000003619821056 2015-04-20 13:18:56.254823 2 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-20 13:18:56.254823 NULL 2015-04-20 13:19:00.855129 1 NULL +002245333855 0000003627301940 2015-04-23 12:22:19.858639 1 HMOM1 RM 001 D02 007 648 A05 001 N N null 12 Pharmacy_Inquiry NULL NULL 2015-04-23 12:22:19.858639 NULL 2015-04-23 12:22:21.917581 1 ["the mm wanted to verify his meds will be covered now I warm transfered to pharmacy"] +002248196142 0000003631127944 2015-04-26 14:08:18.509816 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-26 14:08:18.509816 NULL 2015-04-26 14:08:23.945992 1 NULL +002248196142 0000003631127944 2015-04-26 14:08:18.509816 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-26 14:08:18.509816 NULL 2015-04-26 14:08:23.945992 1 NULL +002267582534 0000003657794733 2015-05-12 11:21:14.976263 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-05-12 11:21:14.976263 NULL 2015-05-12 11:21:20.583068 1 NULL +002283483949 0000003680775536 2015-05-28 11:41:14.196351 1 HMOM1 RM 001 D02 007 311 008 001 Y N null 2 Benefit_Inquiry NULL [" "] 2015-05-28 11:41:14.196351 NULL 2015-05-28 11:41:15.923476 1 NULL +002283483949 0000003680775536 2015-05-28 11:41:14.196351 1 HMOM1 RM 001 D02 007 311 008 001 Y N null 2 Benefit_Inquiry NULL [" "] 2015-05-28 11:41:14.196351 NULL 2015-05-28 11:41:15.923476 1 NULL +002283483949 0000003680775536 2015-05-28 11:41:14.196351 1 HMOM1 RM 001 D02 007 311 008 001 Y N null 2 Benefit_Inquiry NULL [" "] 2015-05-28 11:41:14.196351 NULL 2015-05-28 11:41:15.923476 1 NULL +002283483949 0000003680775536 2015-05-28 11:41:14.196351 1 HMOM1 RM 001 D02 007 311 008 001 Y N null 2 Benefit_Inquiry NULL [" "] 2015-05-28 11:41:14.196351 NULL 2015-05-28 11:41:15.923476 1 NULL +002283483949 0000003680776473 2015-05-28 11:41:31.095227 1 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:42:48.527989 NULL 2015-05-28 11:41:32.922456 1 ["did adv mm with lis he has sep to do plan change he inq on having medical copays, did offer oral grievance."] +002283483949 0000003680776473 2015-05-28 11:41:31.095227 1 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:42:48.527989 NULL 2015-05-28 11:41:32.922456 1 ["did adv mm with lis he has sep to do plan change he inq on having medical copays, did offer oral grievance."] +002283483949 0000003680776473 2015-05-28 11:41:31.095227 1 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:42:48.527989 NULL 2015-05-28 11:41:32.922456 1 ["did adv mm with lis he has sep to do plan change he inq on having medical copays, did offer oral grievance."] +002283483949 0000003680776473 2015-05-28 11:41:31.095227 1 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-05-28 11:42:48.527989 NULL 2015-05-28 11:41:32.922456 1 ["did adv mm with lis he has sep to do plan change he inq on having medical copays, did offer oral grievance."] +002246948195 0000003629543953 2015-04-24 12:50:43.478244 1 HMOM1 RM 001 D02 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-04-24 12:50:43.478244 NULL 2015-04-24 12:50:45.758653 1 NULL +002283483949 0000003680733396 2015-05-28 11:28:01.627319 1 HMOM1 RM 001 D02 007 365 164 001 Y N null 11 Mbr_plan_info_upd_Inquiry NULL [" "] 2015-05-28 11:28:01.627319 NULL 2015-05-28 11:28:08.008998 1 NULL +002283483949 0000003680733396 2015-05-28 11:28:01.627319 1 HMOM1 RM 001 D02 007 365 164 001 Y N null 11 Mbr_plan_info_upd_Inquiry NULL [" "] 2015-05-28 11:28:01.627319 NULL 2015-05-28 11:28:08.008998 1 NULL +002283483949 0000003680733396 2015-05-28 11:28:01.627319 1 HMOM1 RM 001 D02 007 365 164 001 Y N null 11 Mbr_plan_info_upd_Inquiry NULL [" "] 2015-05-28 11:28:01.627319 NULL 2015-05-28 11:28:08.008998 1 NULL +002283483949 0000003680733396 2015-05-28 11:28:01.627319 1 HMOM1 RM 001 D02 007 365 164 001 Y N null 11 Mbr_plan_info_upd_Inquiry NULL [" "] 2015-05-28 11:28:01.627319 NULL 2015-05-28 11:28:08.008998 1 NULL +002283483949 0000003680776462 2015-05-28 11:41:30.938091 1 HMOM1 RM 001 D02 007 722 339 001 Y N null 13 Premium_Rates_Inquiry NULL [" "] 2015-05-28 11:41:30.938091 NULL 2015-05-28 11:41:32.918427 1 NULL +002283483949 0000003680776462 2015-05-28 11:41:30.938091 1 HMOM1 RM 001 D02 007 722 339 001 Y N null 13 Premium_Rates_Inquiry NULL [" "] 2015-05-28 11:41:30.938091 NULL 2015-05-28 11:41:32.918427 1 NULL +002283483949 0000003680776462 2015-05-28 11:41:30.938091 1 HMOM1 RM 001 D02 007 722 339 001 Y N null 13 Premium_Rates_Inquiry NULL [" "] 2015-05-28 11:41:30.938091 NULL 2015-05-28 11:41:32.918427 1 NULL +002283483949 0000003680776462 2015-05-28 11:41:30.938091 1 HMOM1 RM 001 D02 007 722 339 001 Y N null 13 Premium_Rates_Inquiry NULL [" "] 2015-05-28 11:41:30.938091 NULL 2015-05-28 11:41:32.918427 1 NULL +002245282386 0000003627217285 2015-04-23 11:54:39.238357 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-23 22:14:01.288132 NULL 2015-04-23 11:54:40.740061 1 NULL +002239795904 0000003619862034 2015-04-20 13:41:28.340287 2 HMOM1 RM 001 D02 007 311 008 001 Y N null 2 Benefit_Inquiry NULL [" "] 2015-04-20 13:44:03.799492 NULL 2015-04-20 13:41:32.079266 1 ["provided ent for possible ear wax removal. mem also inquired on pharmacy. advised nonpar."] +002248196142 0000003631127951 2015-04-26 14:08:22.388518 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-26 14:08:22.388518 NULL 2015-04-26 14:08:25.542505 1 NULL +002248196142 0000003631127951 2015-04-26 14:08:22.388518 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-26 14:08:22.388518 NULL 2015-04-26 14:08:25.542505 1 NULL +002237527045 0000003616233351 2015-04-16 12:28:01.05885 1 HMOM1 RM 001 D02 007 354 160 001 N N null 14 Provider_Inquiry NULL NULL 2015-04-16 22:17:05.239032 NULL 2015-04-16 12:28:06.079121 1 ["S MD Specialties: Gastroenterology Specialties: Gastroenterology Specialties: Gastroenterology"] +002267582534 0000003657813303 2015-05-12 11:26:20.219803 1 HMOM1 RM 001 D02 007 354 513 001 N N null 14 Provider_Inquiry NULL NULL 2015-05-12 11:26:20.219803 NULL 2015-05-12 11:26:22.063375 1 ["CAP Diagnostics is not a participating provider mm has recieved a bill from them, adv mm that the bill will be his responsibility due to them being out of network"] +002245243791 0000003627159428 2015-04-23 11:37:27.837731 1 HMOM1 RM 001 D02 007 647 341 001 Y N null 98 Exclude NULL NULL 2015-04-23 22:23:09.553824 NULL 2015-04-23 11:37:32.071077 1 NULL +002239795904 0000003619820988 2015-04-20 13:18:53.730938 2 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-20 13:18:53.730938 NULL 2015-04-20 13:18:55.909942 1 NULL +002235599616 0000003613165501 2015-04-14 15:03:01.303044 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-14 15:03:01.303044 NULL 2015-04-14 15:03:05.38129 1 NULL +002245333855 0000003627296700 2015-04-23 12:20:33.941065 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-23 12:20:33.941065 NULL 2015-04-23 12:20:36.544049 1 NULL +002273726300 0000003666815979 2015-05-18 15:53:57.882281 1 HMOM1 RM 001 D01 007 354 001 001 N N null 14 Provider_Inquiry NULL NULL 2015-05-18 15:53:57.882281 NULL 2015-05-18 15:54:03.911377 1 ["the mm said he has a appt tomorrow to see a hearing specialist but forgot the drs name and phone # he does have the address which is Encino, CA 91436 I looked this up in gave him names of providers at this address"] +002250650385 0000003634483681 2015-04-28 11:12:49.588126 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-04-28 11:12:49.588126 NULL 2015-04-28 11:12:55.024475 1 NULL +002235599616 0000003613177879 2015-04-14 15:09:54.738286 1 HMOM1 RM 001 D02 007 311 001 001 N N null 2 Benefit_Inquiry NULL NULL 2015-04-14 15:09:54.738286 NULL 2015-04-14 15:10:00.32106 1 ["let mm knw pharmacy is not par"] +002250650385 0000003634483847 2015-04-28 11:12:52.641296 1 HMOM1 RM 001 D02 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-28 11:12:52.641296 NULL 2015-04-28 11:12:55.503579 1 NULL +002207463467 0000003572242068 2015-03-18 11:14:47.621016 1 HMOM1 RM 001 D02 007 335 088 001 Y N null 98 Exclude NULL [" "] 2015-03-18 11:14:47.621016 NULL 2015-03-18 11:14:52.904626 1 NULL +002245467256 0000003627505090 2015-04-23 13:31:57.531953 1 HMOM1 RM 001 D01 007 722 832 001 Y N null 98 Exclude NULL [" "] 2015-04-23 13:31:57.531953 NULL 2015-04-23 13:31:58.697025 1 NULL +002245467256 0000003627503551 2015-04-23 13:31:26.62283 1 HMOM1 RM 001 D01 007 738 000 001 Y N null 98 Exclude NULL NULL 2015-04-23 13:31:26.62283 NULL 2015-04-23 13:31:30.861259 1 NULL +002207463467 0000003572246347 2015-03-18 11:16:02.920442 1 HMOM1 RM 001 D02 007 776 016 001 N N null 9 General_Admin_Inquiry NULL NULL 2015-03-18 11:16:02.920442 NULL 2015-03-18 11:16:08.901477 1 ["calling about Health Assessment letter.. advised it is optional"] \ No newline at end of file http://git-wip-us.apache.org/repos/asf/hive/blob/2a77e87e/itests/src/test/resources/testconfiguration.properties ---------------------------------------------------------------------- diff --git a/itests/src/test/resources/testconfiguration.properties b/itests/src/test/resources/testconfiguration.properties index 0580fee..441b278 100644 --- a/itests/src/test/resources/testconfiguration.properties +++ b/itests/src/test/resources/testconfiguration.properties @@ -333,6 +333,7 @@ minitez.query.files=bucket_map_join_tez1.q,\ tez_fsstat.q,\ tez_insert_overwrite_local_directory_1.q,\ tez_join_hash.q,\ + tez_join_result_complex.q,\ tez_join_tests.q,\ tez_joins_explain.q,\ tez_schema_evolution.q,\ http://git-wip-us.apache.org/repos/asf/hive/blob/2a77e87e/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/HybridHashTableContainer.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/HybridHashTableContainer.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/HybridHashTableContainer.java index cf4c71d..e338a31 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/HybridHashTableContainer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/HybridHashTableContainer.java @@ -26,6 +26,7 @@ import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.apache.commons.logging.Log; @@ -733,6 +734,8 @@ public class HybridHashTableContainer private final ByteArrayRef uselessIndirection; // LBStruct needs ByteArrayRef private final LazyBinaryStruct valueStruct; + private final boolean needsComplexObjectFixup; + private final ArrayList complexObjectArrayBuffer; private int partitionId; // Current hashMap in use @@ -740,8 +743,18 @@ public class HybridHashTableContainer if (internalValueOi != null) { valueStruct = (LazyBinaryStruct) LazyBinaryFactory.createLazyBinaryObject(internalValueOi); + needsComplexObjectFixup = MapJoinBytesTableContainer.hasComplexObjects(internalValueOi); + if (needsComplexObjectFixup) { + complexObjectArrayBuffer = + new ArrayList( + Collections.nCopies(internalValueOi.getAllStructFieldRefs().size(), null)); + } else { + complexObjectArrayBuffer = null; + } } else { valueStruct = null; // No rows? + needsComplexObjectFixup = false; + complexObjectArrayBuffer = null; } uselessIndirection = new ByteArrayRef(); hashMapResult = new BytesBytesMultiHashMap.Result(); @@ -836,7 +849,7 @@ public class HybridHashTableContainer if (byteSegmentRef == null) { return null; } else { - return uppack(byteSegmentRef); + return unpack(byteSegmentRef); } } @@ -848,18 +861,29 @@ public class HybridHashTableContainer if (byteSegmentRef == null) { return null; } else { - return uppack(byteSegmentRef); + return unpack(byteSegmentRef); } } - private List uppack(WriteBuffers.ByteSegmentRef ref) throws HiveException { + private List unpack(WriteBuffers.ByteSegmentRef ref) throws HiveException { if (ref.getLength() == 0) { return EMPTY_LIST; // shortcut, 0 length means no fields } uselessIndirection.setData(ref.getBytes()); valueStruct.init(uselessIndirection, (int)ref.getOffset(), ref.getLength()); - return valueStruct.getFieldsAsList(); // TODO: should we unset bytes after that? + List result; + if (!needsComplexObjectFixup) { + // Good performance for common case where small table has no complex objects. + result = valueStruct.getFieldsAsList(); + } else { + // Convert the complex LazyBinary objects to standard (Java) objects so downstream + // operators like FileSinkOperator can serialize complex objects in the form they expect + // (i.e. Java objects). + result = MapJoinBytesTableContainer.getComplexFieldsAsList( + valueStruct, complexObjectArrayBuffer, internalValueOi); + } + return result; } @Override http://git-wip-us.apache.org/repos/asf/hive/blob/2a77e87e/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinBytesTableContainer.java ---------------------------------------------------------------------- diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinBytesTableContainer.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinBytesTableContainer.java index 34b3aa9..83a1521 100644 --- a/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinBytesTableContainer.java +++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/persistence/MapJoinBytesTableContainer.java @@ -21,6 +21,7 @@ package org.apache.hadoop.hive.ql.exec.persistence; import java.io.ObjectOutputStream; import java.util.ArrayList; +import java.util.Collections; import java.util.List; import org.apache.commons.logging.Log; @@ -29,7 +30,6 @@ import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hive.conf.HiveConf; import org.apache.hadoop.hive.ql.exec.ExprNodeEvaluator; import org.apache.hadoop.hive.ql.exec.JoinUtil; -import org.apache.hadoop.hive.ql.exec.JoinUtil.JoinResult; import org.apache.hadoop.hive.ql.exec.vector.VectorHashKeyWrapper; import org.apache.hadoop.hive.ql.exec.vector.VectorHashKeyWrapperBatch; import org.apache.hadoop.hive.ql.exec.vector.expressions.VectorExpressionWriter; @@ -49,8 +49,11 @@ import org.apache.hadoop.hive.serde2.lazybinary.LazyBinaryUtils; import org.apache.hadoop.hive.serde2.lazybinary.objectinspector.LazyBinaryObjectInspectorFactory; import org.apache.hadoop.hive.serde2.lazybinary.objectinspector.LazyBinaryStructObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector.Category; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils; import org.apache.hadoop.hive.serde2.objectinspector.StructField; import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector; +import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.ObjectInspectorCopyOption; import org.apache.hadoop.hive.serde2.objectinspector.primitive.ShortObjectInspector; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfo; import org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils; @@ -397,6 +400,40 @@ public class MapJoinBytesTableContainer hashMap.put(directWriteHelper, -1); } + public static boolean hasComplexObjects(LazyBinaryStructObjectInspector lazyBinaryStructObjectInspector) { + List fields = lazyBinaryStructObjectInspector.getAllStructFieldRefs(); + + for (StructField field : fields) { + if (field.getFieldObjectInspector().getCategory() != Category.PRIMITIVE) { + return true; + } + } + return false; + } + + /* + * For primitive types, use LazyBinary's object. + * For complex types, make a standard (Java) object from LazyBinary's object. + */ + public static List getComplexFieldsAsList(LazyBinaryStruct lazyBinaryStruct, + ArrayList objectArrayBuffer, LazyBinaryStructObjectInspector lazyBinaryStructObjectInspector) { + + List fields = lazyBinaryStructObjectInspector.getAllStructFieldRefs(); + for (int i = 0; i < fields.size(); i++) { + StructField field = fields.get(i); + ObjectInspector objectInspector = field.getFieldObjectInspector(); + Category category = objectInspector.getCategory(); + Object object = lazyBinaryStruct.getField(i); + if (category == Category.PRIMITIVE) { + objectArrayBuffer.set(i, object); + } else { + objectArrayBuffer.set(i, ObjectInspectorUtils.copyToStandardObject( + object, objectInspector, ObjectInspectorCopyOption.WRITABLE)); + } + } + return objectArrayBuffer; + } + /** Implementation of ReusableGetAdaptor that has Output for key serialization; row * container is also created once and reused for every row. */ private class GetAdaptor implements ReusableGetAdaptor, ReusableGetAdaptorDirectAccess { @@ -510,13 +547,25 @@ public class MapJoinBytesTableContainer private final ByteArrayRef uselessIndirection; // LBStruct needs ByteArrayRef private final LazyBinaryStruct valueStruct; + private final boolean needsComplexObjectFixup; + private final ArrayList complexObjectArrayBuffer; public ReusableRowContainer() { if (internalValueOi != null) { valueStruct = (LazyBinaryStruct) LazyBinaryFactory.createLazyBinaryObject(internalValueOi); + needsComplexObjectFixup = hasComplexObjects(internalValueOi); + if (needsComplexObjectFixup) { + complexObjectArrayBuffer = + new ArrayList( + Collections.nCopies(internalValueOi.getAllStructFieldRefs().size(), null)); + } else { + complexObjectArrayBuffer = null; + } } else { valueStruct = null; // No rows? + needsComplexObjectFixup = false; + complexObjectArrayBuffer = null; } uselessIndirection = new ByteArrayRef(); hashMapResult = new BytesBytesMultiHashMap.Result(); @@ -596,7 +645,7 @@ public class MapJoinBytesTableContainer if (byteSegmentRef == null) { return null; } else { - return uppack(byteSegmentRef); + return unpack(byteSegmentRef); } } @@ -608,18 +657,29 @@ public class MapJoinBytesTableContainer if (byteSegmentRef == null) { return null; } else { - return uppack(byteSegmentRef); + return unpack(byteSegmentRef); } } - private List uppack(WriteBuffers.ByteSegmentRef ref) throws HiveException { + private List unpack(WriteBuffers.ByteSegmentRef ref) throws HiveException { if (ref.getLength() == 0) { return EMPTY_LIST; // shortcut, 0 length means no fields } uselessIndirection.setData(ref.getBytes()); valueStruct.init(uselessIndirection, (int)ref.getOffset(), ref.getLength()); - return valueStruct.getFieldsAsList(); // TODO: should we unset bytes after that? + List result; + if (!needsComplexObjectFixup) { + // Good performance for common case where small table has no complex objects. + result = valueStruct.getFieldsAsList(); + } else { + // Convert the complex LazyBinary objects to standard (Java) objects so downstream + // operators like FileSinkOperator can serialize complex objects in the form they expect + // (i.e. Java objects). + result = getComplexFieldsAsList( + valueStruct, complexObjectArrayBuffer, internalValueOi); + } + return result; } @Override http://git-wip-us.apache.org/repos/asf/hive/blob/2a77e87e/ql/src/test/queries/clientpositive/tez_join_result_complex.q ---------------------------------------------------------------------- diff --git a/ql/src/test/queries/clientpositive/tez_join_result_complex.q b/ql/src/test/queries/clientpositive/tez_join_result_complex.q new file mode 100644 index 0000000..5bc9151 --- /dev/null +++ b/ql/src/test/queries/clientpositive/tez_join_result_complex.q @@ -0,0 +1,139 @@ +SET hive.auto.convert.join=true; +SET hive.auto.convert.join.noconditionaltask=true; +SET hive.auto.convert.join.noconditionaltask.size=1000000000; +set hive.mapjoin.optimized.hashtable=true; + +create table service_request_clean( +cnctevn_id string , +svcrqst_id string , +svcrqst_crt_dts string , +subject_seq_no int , +plan_component string , +cust_segment string , +cnctyp_cd string , +cnctmd_cd string , +cnctevs_cd string , +svcrtyp_cd string , +svrstyp_cd string , +cmpltyp_cd string , +catsrsn_cd string , +apealvl_cd string , +cnstnty_cd string , +svcrqst_asrqst_ind string , +svcrqst_rtnorig_in string , +svcrqst_vwasof_dt string , +sum_reason_cd string , +sum_reason string , +crsr_master_claim_index string , +svcrqct_cds array , +svcrqst_lupdt string , +crsr_lupdt timestamp , +cntevsds_lupdt string , +ignore_me int , +notes array ) +ROW FORMAT DELIMITED +FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' +STORED AS TEXTFILE; + +load data local inpath '../../data/files/service_request_clean.txt' into table service_request_clean; + +create table ct_events_clean( +contact_event_id string , +ce_create_dt string , +ce_end_dt string , +contact_type string , +cnctevs_cd string , +contact_mode string , +cntvnst_stts_cd string , +total_transfers int , +ce_notes array ) +ROW FORMAT DELIMITED +FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' +STORED AS TEXTFILE; + +load data local inpath '../../data/files/ct_events_clean.txt' into table ct_events_clean; + +set hive.mapjoin.hybridgrace.hashtable=false; +drop table if exists ct_events1_test; + +explain extended +create table ct_events1_test +as select a.*, +b.svcrqst_id, +b.svcrqct_cds, +b.svcrtyp_cd, +b.cmpltyp_cd, +b.sum_reason_cd as src, +b.cnctmd_cd, +b.notes +from ct_events_clean a +inner join +service_request_clean b +on a.contact_event_id = b.cnctevn_id; + +-- SORT_QUERY_RESULTS + +create table ct_events1_test +as select a.*, +b.svcrqst_id, +b.svcrqct_cds, +b.svcrtyp_cd, +b.cmpltyp_cd, +b.sum_reason_cd as src, +b.cnctmd_cd, +b.notes +from ct_events_clean a +inner join +service_request_clean b +on a.contact_event_id = b.cnctevn_id; + +select * from ct_events1_test; + +set hive.mapjoin.hybridgrace.hashtable=true; +drop table if exists ct_events1_test; + +explain extended +create table ct_events1_test +as select a.*, +b.svcrqst_id, +b.svcrqct_cds, +b.svcrtyp_cd, +b.cmpltyp_cd, +b.sum_reason_cd as src, +b.cnctmd_cd, +b.notes +from ct_events_clean a +inner join +service_request_clean b +on a.contact_event_id = b.cnctevn_id; + +-- SORT_QUERY_RESULTS + +create table ct_events1_test +as select a.*, +b.svcrqst_id, +b.svcrqct_cds, +b.svcrtyp_cd, +b.cmpltyp_cd, +b.sum_reason_cd as src, +b.cnctmd_cd, +b.notes +from ct_events_clean a +inner join +service_request_clean b +on a.contact_event_id = b.cnctevn_id; + +select * from ct_events1_test; + + + + + + + + + + + + +