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 2015/12/23 18:13:47 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-1721] SHOWDDL fix for descending division by

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master b9a4f68ce -> 728dbbf3e


[TRAFODION-1721] SHOWDDL fix for descending division by


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/68ce84d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/68ce84d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/68ce84d2

Branch: refs/heads/master
Commit: 68ce84d276c31ceeec978dee10ffe79775b82113
Parents: 5746be3
Author: Hans Zeller <ze...@edev05.esgyn.local>
Authored: Wed Dec 23 02:37:38 2015 +0000
Committer: Hans Zeller <ze...@edev05.esgyn.local>
Committed: Wed Dec 23 02:37:38 2015 +0000

----------------------------------------------------------------------
 core/sql/sqlcomp/CmpDescribe.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/68ce84d2/core/sql/sqlcomp/CmpDescribe.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpDescribe.cpp b/core/sql/sqlcomp/CmpDescribe.cpp
index c4e04b5..aa55e0d 100644
--- a/core/sql/sqlcomp/CmpDescribe.cpp
+++ b/core/sql/sqlcomp/CmpDescribe.cpp
@@ -2798,6 +2798,7 @@ short CmpDescribeSeabaseTable (
   NABoolean isDivisioned = FALSE;
   ItemExpr *saltExpr;
   LIST(NAString) divisioningExprs;
+  LIST(NABoolean) divisioningExprAscOrders;
 
   if (naTable->getClusteringIndex())
     {
@@ -2817,9 +2818,11 @@ short CmpDescribeSeabaseTable (
                 }
               else if (nac->isDivisioningColumn() && !withoutDivisioning)
                 {
+                  NABoolean divColIsAsc = naf->getIndexKeyColumns().isAscending(i);
                   // any other case of computed column is treated as divisioning for now
                   isDivisioned = TRUE;
                   divisioningExprs.insert(NAString(nac->getComputedColumnExprString()));
+                  divisioningExprAscOrders.insert(divColIsAsc);
                 }
             }
           if (NOT nac->isSystemColumn())
@@ -2960,6 +2963,8 @@ short CmpDescribeSeabaseTable (
               if (d > 0)
                 divByClause += ", ";
               divByClause += divisioningExprs[d];
+              if (!divisioningExprAscOrders[d])
+                divByClause += " DESC";
             }
           outputShortLine(space, divByClause.data());
           divByClause = "     NAMED AS (";


[2/2] incubator-trafodion git commit: Merge [TRAFODION-1721] PR 240 SHOWDDL fix for desc divisioning columns

Posted by db...@apache.org.
Merge [TRAFODION-1721] PR 240 SHOWDDL fix for desc divisioning columns


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/728dbbf3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/728dbbf3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/728dbbf3

Branch: refs/heads/master
Commit: 728dbbf3e58fc44cf72b8352483002052b862c64
Parents: b9a4f68 68ce84d
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Dec 23 17:13:15 2015 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Dec 23 17:13:15 2015 +0000

----------------------------------------------------------------------
 core/sql/sqlcomp/CmpDescribe.cpp | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------