Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 92A31200BEB for ; Wed, 23 Nov 2016 00:55:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 913A5160B0C; Tue, 22 Nov 2016 23:55:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DA1D0160B1C for ; Wed, 23 Nov 2016 00:54:59 +0100 (CET) Received: (qmail 6310 invoked by uid 500); 22 Nov 2016 23:54:59 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 6282 invoked by uid 99); 22 Nov 2016 23:54:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2016 23:54:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 2408E1A05FF for ; Tue, 22 Nov 2016 23:54:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.363 X-Spam-Level: X-Spam-Status: No, score=0.363 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id gjaEHdlCtxDJ for ; Tue, 22 Nov 2016 23:54:56 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id F02415F283 for ; Tue, 22 Nov 2016 23:54:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id uAMNsqBS027283; Tue, 22 Nov 2016 23:54:52 GMT Message-Id: <201611222354.uAMNsqBS027283@ip-10-146-233-104.ec2.internal> Date: Tue, 22 Nov 2016 23:54:52 +0000 From: "Michael Brown (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org CC: David Knupp Reply-To: mikeb@cloudera.com X-Gerrit-MessageType: newpatchset Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4450=3A_qgen=3A_use_string_concatenation_operator_for_postgres_queries=0A?= X-Gerrit-Change-Id: I149b695889addfd7df4ca5f40dc991456da51687 X-Gerrit-ChangeURL: X-Gerrit-Commit: a79f960f6aa0a2be19d9fa803c857ade42da62bb In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.2 archived-at: Tue, 22 Nov 2016 23:55:00 -0000 Michael Brown has uploaded a new patch set (#3). Change subject: IMPALA-4450: qgen: use string concatenation operator for postgres queries ...................................................................... IMPALA-4450: qgen: use string concatenation operator for postgres queries The random query generator writes a logical query Python object into Impala or PostgreSQL dialects. When the CONCAT() function is chosen, Impala's and PostgreSQL's CONCAT() implementations behave differently. However, PostgreSQL has a || operator that functions like Impala's CONCAT(). The method added here overrides the default behavior for the PostgresqlSqlWriter. It prevents CONCAT(arg1, arg2, ..., argN) from being written and instead causes the SQL to be written as 'arg1 || arg2 || ... || argN'. Testing: I made sure that we generate syntactically valid queries still on the PostgreSQL side. This includes queries that made use of string concatenation. I also re-ran some failed queries that previously produced different results. They now produce the same results. This is a very straightforward change, so unit or functional tests for this seem overkill. The full effects of using || instead of CONCAT() are hard to test. It's not clear if in my manual testing of || vs. CONCAT() that I missed some edge behavior, especially in some complicated query, nested expressions, GROUPing BY, and so on. Change-Id: I149b695889addfd7df4ca5f40dc991456da51687 --- M tests/comparison/model_translator.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/34/5034/3 -- To view, visit http://gerrit.cloudera.org:8080/5034 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I149b695889addfd7df4ca5f40dc991456da51687 Gerrit-PatchSet: 3 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Michael Brown Gerrit-Reviewer: David Knupp