From issues-return-180617-archive-asf-public=cust-asf.ponee.io@hive.apache.org Mon Mar 2 04:09:03 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 2180A180651 for ; Mon, 2 Mar 2020 05:09:03 +0100 (CET) Received: (qmail 64280 invoked by uid 500); 2 Mar 2020 04:09:02 -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 64254 invoked by uid 99); 2 Mar 2020 04:09: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; Mon, 02 Mar 2020 04:09: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 F1E28E2E39 for ; Mon, 2 Mar 2020 04:09: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 193C7780355 for ; Mon, 2 Mar 2020 04:09:00 +0000 (UTC) Date: Mon, 2 Mar 2020 04:09:00 +0000 (UTC) From: "Shubham Chaurasia (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-22903) Vectorized row_number() resets the row number after one batch in case of constant expression in partition clause 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-22903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17048774#comment-17048774 ] Shubham Chaurasia commented on HIVE-22903: ------------------------------------------ [~rameshkumar] Tests are all green now. Can you please have a look at the patch ? > Vectorized row_number() resets the row number after one batch in case of constant expression in partition clause > ---------------------------------------------------------------------------------------------------------------- > > Key: HIVE-22903 > URL: https://issues.apache.org/jira/browse/HIVE-22903 > Project: Hive > Issue Type: Bug > Components: UDF, Vectorization > Affects Versions: 4.0.0 > Reporter: Shubham Chaurasia > Assignee: Shubham Chaurasia > Priority: Major > Labels: pull-request-available > Attachments: HIVE-22903.01.patch, HIVE-22903.02.patch, HIVE-22903.03.patch, HIVE-22903.04.patch, HIVE-22903.patch > > Time Spent: 10m > Remaining Estimate: 0h > > Vectorized row number implementation resets the row number when constant expression is passed in partition clause. > Repro Query > {code} > select row_number() over(partition by 1) r1, t from over10k_n8; > Or > select row_number() over() r1, t from over10k_n8; > {code} > where table over10k_n8 contains more than 1024 records. > This happens because currently in VectorPTFOperator, we reset evaluators if only partition clause is there. > {code:java} > // If we are only processing a PARTITION BY, reset our evaluators. > if (!isPartitionOrderBy) { > groupBatches.resetEvaluators(); > } > {code} > To resolve, we should also check if the entire partition clause is a constant expression, if it is so then we should not do {{groupBatches.resetEvaluators()}} -- This message was sent by Atlassian Jira (v8.3.4#803005)