Repository: trafodion Updated Branches: refs/heads/master a52f46229 -> 7daf172c9
[TRAFODION-3002] Fix UPDATE STATS for certain INTERVAL data types Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/b5bdab08 Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/b5bdab08 Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/b5bdab08 Branch: refs/heads/master Commit: b5bdab08788099f6f56d079aec9d41b191e448a2 Parents: 3e26f86 Author: Dave Birdsall <[email protected]> Authored: Tue Mar 20 21:18:33 2018 +0000 Committer: Dave Birdsall <[email protected]> Committed: Tue Mar 20 21:18:33 2018 +0000 ---------------------------------------------------------------------- core/sql/ustat/hs_globals.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/b5bdab08/core/sql/ustat/hs_globals.cpp ---------------------------------------------------------------------- diff --git a/core/sql/ustat/hs_globals.cpp b/core/sql/ustat/hs_globals.cpp index a437d97..7267862 100644 --- a/core/sql/ustat/hs_globals.cpp +++ b/core/sql/ustat/hs_globals.cpp @@ -5052,7 +5052,7 @@ static void mapInternalSortTypes(HSColGroupStruct *groupList, NABoolean forHive } else { - sprintf(sbuf, "%d", col.precision+2); + sprintf(sbuf, "%d,0", col.precision+2); // for seconds cast below typeName = getIntTypeForInterval(group, 60 * (Int64)pow(10, col.precision)); } group->ISSelectExpn.append("cast(cast(") @@ -5076,7 +5076,7 @@ static void mapInternalSortTypes(HSColGroupStruct *groupList, NABoolean forHive } else { - sprintf(sbuf, "%d", col.precision+4); + sprintf(sbuf, "%d,0", col.precision+4); // for seconds cast below typeName = getIntTypeForInterval(group, 60 * 60 * (Int64)pow(10, col.precision)); } group->ISSelectExpn.append("cast(cast(") @@ -5100,7 +5100,7 @@ static void mapInternalSortTypes(HSColGroupStruct *groupList, NABoolean forHive } else { - sprintf(sbuf, "%d", col.precision+5); + sprintf(sbuf, "%d,0", col.precision+5); // for seconds cast below typeName = getIntTypeForInterval(group, 24 * 60 * 60 * (Int64)pow(10, col.precision)); } group->ISSelectExpn.append("cast(cast(")
