You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by li...@apache.org on 2018/01/16 16:05:56 UTC
[1/3] trafodion git commit: [TRAFODION-2904] optionally add leading
space when get a number column to display
Repository: trafodion
Updated Branches:
refs/heads/master 27897caaf -> 63e1083d1
[TRAFODION-2904] optionally add leading space when get a number column to display
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/56e9a807
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/56e9a807
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/56e9a807
Branch: refs/heads/master
Commit: 56e9a807ed98b5f304befe834b13d4e62cbebb36
Parents: 8e332e5
Author: Liu Ming <ov...@sina.com>
Authored: Sat Jan 13 09:37:45 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Sat Jan 13 09:37:45 2018 +0000
----------------------------------------------------------------------
core/sql/optimizer/BindItemExpr.cpp | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/56e9a807/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/BindItemExpr.cpp b/core/sql/optimizer/BindItemExpr.cpp
index dcd6897..6bf942f 100644
--- a/core/sql/optimizer/BindItemExpr.cpp
+++ b/core/sql/optimizer/BindItemExpr.cpp
@@ -3654,12 +3654,10 @@ ItemExpr *Concat::bindNode(BindWA *bindWA)
else if (convType == 2)
{
Parser parser(bindWA->currentCmpContext());
- char buf[1000];
+ char buf[128];
- // right justify the string representation of numeric operand
- // and then do the concat
- sprintf(buf, "CAST(SPACE(%d - CHAR_LENGTH(CAST(@A1 AS VARCHAR(%d)))) || CAST(@A1 AS VARCHAR(%d)) AS VARCHAR(%d))",
- dLen, dLen, dLen, dLen);
+ sprintf(buf, "CAST(CAST(@A1 AS VARCHAR(%d)) AS VARCHAR(%d))",
+ dLen, dLen);
newChild =
parser.getItemExprTree(buf, strlen(buf), BINDITEMEXPR_STMTCHARSET, 1, child(srcChildIndex));
[3/3] trafodion git commit: [TRAFODION-2904] optionally add leading
space when get a number column to display
Posted by li...@apache.org.
[TRAFODION-2904] optionally add leading space when get a number column to display
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/63e1083d
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/63e1083d
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/63e1083d
Branch: refs/heads/master
Commit: 63e1083d1e75d68845b92c48d4520a1fa25adf6b
Parents: 27897ca 5dbc250
Author: Liu Ming <ov...@sina.com>
Authored: Tue Jan 16 10:51:36 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Tue Jan 16 10:51:36 2018 +0000
----------------------------------------------------------------------
core/sql/optimizer/BindItemExpr.cpp | 8 +++-----
core/sql/regress/seabase/EXPECTED032 | 4 ++--
2 files changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/63e1083d/core/sql/optimizer/BindItemExpr.cpp
----------------------------------------------------------------------
[2/3] trafodion git commit: fix regression issue
Posted by li...@apache.org.
fix regression issue
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/5dbc2508
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/5dbc2508
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/5dbc2508
Branch: refs/heads/master
Commit: 5dbc2508f8537e9a5fe5fd6d285ae8a0bf419237
Parents: 56e9a80
Author: Liu Ming <ov...@sina.com>
Authored: Sun Jan 14 10:33:40 2018 +0000
Committer: Liu Ming <ov...@sina.com>
Committed: Sun Jan 14 10:33:40 2018 +0000
----------------------------------------------------------------------
core/sql/regress/seabase/EXPECTED032 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/5dbc2508/core/sql/regress/seabase/EXPECTED032
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/EXPECTED032 b/core/sql/regress/seabase/EXPECTED032
index 5a4aa97..b975865 100644
--- a/core/sql/regress/seabase/EXPECTED032
+++ b/core/sql/regress/seabase/EXPECTED032
@@ -333,8 +333,8 @@ B
(EXPR)
------------
- 11
- 21
+11
+21
--- 2 row(s) selected.
>>insert into t032t1 values ('3', 3, 3, date '2016-08-15', time '10:11:12',