Fix issue where optimization on key column addition should be turned off for MDAM scans, and update EXPECTEDTESTRTS to showcase the new value expected as byte read showing a 53% improvement over previous code
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/90795250 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/90795250 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/90795250 Branch: refs/heads/master Commit: 90795250785f50cc0538284f22b1b8589a84734a Parents: 38573bf Author: Eric Owhadi <[email protected]> Authored: Fri Jan 8 15:05:38 2016 +0000 Committer: Eric Owhadi <[email protected]> Committed: Fri Jan 8 15:05:38 2016 +0000 ---------------------------------------------------------------------- core/sql/generator/GenPreCode.cpp | 2 +- core/sql/regress/core/EXPECTEDRTS | 1390 ++++++++++++++++---------------- 2 files changed, 696 insertions(+), 696 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/90795250/core/sql/generator/GenPreCode.cpp ---------------------------------------------------------------------- diff --git a/core/sql/generator/GenPreCode.cpp b/core/sql/generator/GenPreCode.cpp index 28bff1c..4cf0ba0 100644 --- a/core/sql/generator/GenPreCode.cpp +++ b/core/sql/generator/GenPreCode.cpp @@ -11928,7 +11928,7 @@ RelExpr * HbaseAccess::preCodeGen(Generator * generator, // value is needed to retrieve a row. //only if needed. If there is already a non nullable non added non nullable with default columns in the set, we should not need to add //any other columns. - if (CmpCommon::getDefault(HBASE_FILTER_PREDS) == DF_MEDIUM){ //only enable column retrieval optimization with DF_MEDIUM + if (CmpCommon::getDefault(HBASE_FILTER_PREDS) == DF_MEDIUM && getMdamKeyPtr() == NULL){ //only enable column retrieval optimization with DF_MEDIUM and not for MDAM scan bool needAddingNonNullableColumn = true; //assume we need to add one non nullable column for (ValueId vid = retColRefSet_.init();// look for each column in th eresult set if one match the criteria non null non added non nullable with default retColRefSet_.next(vid);
