impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Brown (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4450: qgen: use string concatenation operator for postgres queries
Date Thu, 10 Nov 2016 18:57:24 GMT
Michael Brown has uploaded a new change for review.

  http://gerrit.cloudera.org:8080/5034

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 and PostgreSQL's CONCAT() implementations behave differently.
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:

It's difficult to fully test the effects here. 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-run
some failed queries that previously produced different results. They now
produce the same results.

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/1
-- 
To view, visit http://gerrit.cloudera.org:8080/5034
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I149b695889addfd7df4ca5f40dc991456da51687
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Brown <mikeb@cloudera.com>

Mime
View raw message