From issues-return-193211-apmail-hive-issues-archive=hive.apache.org@hive.apache.org Thu Jun 11 17:07:04 2020 Return-Path: X-Original-To: apmail-hive-issues-archive@minotaur.apache.org Delivered-To: apmail-hive-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id B80C519989 for ; Thu, 11 Jun 2020 17:07:03 +0000 (UTC) Received: (qmail 3039 invoked by uid 500); 11 Jun 2020 17:07:03 -0000 Delivered-To: apmail-hive-issues-archive@hive.apache.org Received: (qmail 2979 invoked by uid 500); 11 Jun 2020 17:07:03 -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 2884 invoked by uid 99); 11 Jun 2020 17:07:03 -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; Thu, 11 Jun 2020 17:07:03 +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 7587541296 for ; Thu, 11 Jun 2020 17:07:02 +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 A449F78238D for ; Thu, 11 Jun 2020 17:07:00 +0000 (UTC) Date: Thu, 11 Jun 2020 17:07:00 +0000 (UTC) From: "David Mollitor (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-21636) ReplaceAll() -> replace() for non regex strings 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-21636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] David Mollitor updated HIVE-21636: ---------------------------------- Summary: ReplaceAll() -> replace() for non regex strings (was: Performance cost when using replaceAll() vs replace() ) > ReplaceAll() -> replace() for non regex strings > ----------------------------------------------- > > Key: HIVE-21636 > URL: https://issues.apache.org/jira/browse/HIVE-21636 > Project: Hive > Issue Type: Improvement > Components: Accumulo Storage Handler, HCatalog, Vectorization > Reporter: bd2019us > Assignee: bd2019us > Priority: Trivial > Labels: pull-request-available > Fix For: 4.0.0 > > Attachments: HVIE-21636.patch > > Time Spent: 20m > Remaining Estimate: 0h > > Use String.replace() instead of String.replaceAll() when replaceAll() does not use a regex > replace() does not need extra compilation / performance overhead when a non-regex string is used. Thus changing replaceAll() to replace() can remove the associated performance overhead. > Affected files: > # accumulo-handler/src/java/org/apache/hadoop/hive/accumulo/predicate/compare/StringCompare.java > # hcatalog/core/src/main/java/org/apache/hive/hcatalog/mapreduce/FileOutputCommitterContainer.java > # vector-code-gen/src/org/apache/hadoop/hive/tools/GenVectorCode.java -- This message was sent by Atlassian Jira (v8.3.4#803005)