From issues-return-199774-apmail-hive-issues-archive=hive.apache.org@hive.apache.org Fri Oct 2 10:20:02 2020 Return-Path: X-Original-To: apmail-hive-issues-archive@locus.apache.org Delivered-To: apmail-hive-issues-archive@locus.apache.org Received: from mxout1-ec2-va.apache.org (mxout1-ec2-va.apache.org [3.227.148.255]) by minotaur.apache.org (Postfix) with ESMTP id 220391A592 for ; Fri, 2 Oct 2020 10:20:02 +0000 (UTC) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-ec2-va.apache.org (ASF Mail Server at mxout1-ec2-va.apache.org) with SMTP id D55D542A09 for ; Fri, 2 Oct 2020 10:20:01 +0000 (UTC) Received: (qmail 79843 invoked by uid 500); 2 Oct 2020 10:20:01 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 79794 invoked by uid 500); 2 Oct 2020 10:20:01 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 79768 invoked by uid 99); 2 Oct 2020 10:20:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Oct 2020 10:20:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id D4F6E40043 for ; Fri, 2 Oct 2020 10:20:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 3716B780242 for ; Fri, 2 Oct 2020 10:20:00 +0000 (UTC) Date: Fri, 2 Oct 2020 10:20:00 +0000 (UTC) From: "Stamatis Zampetakis (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-24221) Use vectorizable expression to combine multiple columns in semijoin bloom filters MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-24221?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17206086#comment-17206086 ] Stamatis Zampetakis commented on HIVE-24221: -------------------------------------------- There are various ways to create a hash from composite keys/columns. Without any special effort to derive a perfect hash function we can do the following: Input columns: A, B, C, D +Option A:+ {noformat} hash(hash(hash(A, B), C), D) {noformat} +Option B:+ {noformat} 31*(31*(31 * hash(A) + hash(B)) + hash(C)) + hash(D) {noformat} The second option is more or less what happens currently when we write hash(A, B, C, D) in the non-vectorized implementation of GenericUDFMurmurHash. The first option although it looks simpler is computationally more expensive. > Use vectorizable expression to combine multiple columns in semijoin bloom filters > --------------------------------------------------------------------------------- > > Key: HIVE-24221 > URL: https://issues.apache.org/jira/browse/HIVE-24221 > Project: Hive > Issue Type: Improvement > Components: Query Planning > Environment: > Reporter: Stamatis Zampetakis > Assignee: Stamatis Zampetakis > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > Currently, multi-column semijoin reducers use an n-ary call to GenericUDFMurmurHash to combine multiple values into one, which is used as an entry to the bloom filter. However, there are no vectorized operators that treat n-ary inputs. The same goes for the vectorized implementation of GenericUDFMurmurHash introduced in HIVE-23976. > The goal of this issue is to choose an alternative way to combine multiple values into one to pass in the bloom filter comprising only vectorized operators. -- This message was sent by Atlassian Jira (v8.3.4#803005)