You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2017/12/14 17:49:41 UTC
[1/2] incubator-trafodion git commit: fix TRAFODION-2830
Repository: incubator-trafodion
Updated Branches:
refs/heads/master d5a7f5b68 -> 8a01b5a8d
fix TRAFODION-2830
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/7d185ab4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/7d185ab4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/7d185ab4
Branch: refs/heads/master
Commit: 7d185ab4c323ed838026a673681657457b7195d1
Parents: a07222f
Author: SuJinpei <87...@qq.com>
Authored: Wed Dec 6 16:35:40 2017 +0800
Committer: SuJinpei <87...@qq.com>
Committed: Wed Dec 6 16:35:40 2017 +0800
----------------------------------------------------------------------
core/conn/odb/src/odb.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/7d185ab4/core/conn/odb/src/odb.c
----------------------------------------------------------------------
diff --git a/core/conn/odb/src/odb.c b/core/conn/odb/src/odb.c
index 31bdb95..c5242f7 100755
--- a/core/conn/odb/src/odb.c
+++ b/core/conn/odb/src/odb.c
@@ -5772,8 +5772,14 @@ static void etabadd(char type, char *run, int id)
}
if ( etab[no].ps ) { /* Multi-stream table analysis */
if ( etab[no].sb ) { /* split by */
- snprintf((char *)Obuf[0], sizeof(Obuf[0]),
- "SELECT MIN(%s), MAX(%s) FROM %s", etab[no].sb, etab[no].sb, etab[no].src);
+ if (etab[no].map) { /* if we get a pwhere condition, we apply it to improve perfomance */
+ snprintf((char *)Obuf[0], sizeof(Obuf[0]),
+ "SELECT MIN(%s), MAX(%s) FROM %s WHERE %s", etab[no].sb, etab[no].sb, etab[no].src, etab[no].map);
+ }
+ else {
+ snprintf((char *)Obuf[0], sizeof(Obuf[0]),
+ "SELECT MIN(%s), MAX(%s) FROM %s", etab[no].sb, etab[no].sb, etab[no].src);
+ }
if (!SQL_SUCCEEDED(Oret=SQLExecDirect (Os1, Obuf[0], SQL_NTS))) {
Oerr(-1, -1, __LINE__, Os1, SQL_HANDLE_STMT);
goto etabadd_exit;
[2/2] incubator-trafodion git commit: Merge [TRAFODION-2830] PR 1325
Fix handling of pwhere condition in odb
Posted by db...@apache.org.
Merge [TRAFODION-2830] PR 1325 Fix handling of pwhere condition in odb
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/8a01b5a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/8a01b5a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/8a01b5a8
Branch: refs/heads/master
Commit: 8a01b5a8da0fac52362b5c8e22f89b3a153f9c4d
Parents: d5a7f5b 7d185ab
Author: Dave Birdsall <db...@apache.org>
Authored: Thu Dec 14 17:49:16 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Thu Dec 14 17:49:16 2017 +0000
----------------------------------------------------------------------
core/conn/odb/src/odb.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------