fix code error
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/e760e11e Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/e760e11e Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/e760e11e Branch: refs/heads/master Commit: e760e11ecd94916db9459de1695a5d10b800e479 Parents: cd3ef4b Author: kakaxi3019 <[email protected]> Authored: Thu Jul 5 16:57:57 2018 +0800 Committer: kakaxi3019 <[email protected]> Committed: Thu Jul 5 16:57:57 2018 +0800 ---------------------------------------------------------------------- core/sql/exp/exp_function.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafodion/blob/e760e11e/core/sql/exp/exp_function.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_function.cpp b/core/sql/exp/exp_function.cpp index ca51354..da24f1f 100644 --- a/core/sql/exp/exp_function.cpp +++ b/core/sql/exp/exp_function.cpp @@ -3022,7 +3022,7 @@ static int lcl_date2Julian(int y, int m ,int d) y = y+4800; } - myjulian = y / 100; + mycentury = y / 100; myjulian = y * 365 - 32167; myjulian += y/4 - mycentury + mycentury / 4; myjulian += 7834 * m / 256 + d; @@ -3184,13 +3184,6 @@ Int64 ex_function_extract::getExtraTimeValue(rec_datetime_field eField, Lng32 eC } case REC_DATE_WOM: { - /*Int64 interval = datetimeOpType->getTotalDays(year, month, 1); - Int64 firstdayinmonthofweek = lcl_dayofweek(interval); - int exceptday = 0; - if (firstdayinmonthofweek != 2) - exceptday = 7 - firstdayinmonthofweek + 2; - - return (day - exceptday)/7 + (day < exceptday ? 0 : 1);*/ return ((day-1)/7+1); } case REC_DATE_CENTURY:
