Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CC1DE200B35 for ; Tue, 5 Jul 2016 15:29:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id CA552160A60; Tue, 5 Jul 2016 13:29:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D5601160A2C for ; Tue, 5 Jul 2016 15:29:02 +0200 (CEST) Received: (qmail 52197 invoked by uid 500); 5 Jul 2016 13:29:00 -0000 Mailing-List: contact commits-help@trafodion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: commits@trafodion.apache.org Delivered-To: mailing list commits@trafodion.apache.org Received: (qmail 52161 invoked by uid 99); 5 Jul 2016 13:28:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2016 13:28:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 56EE3C00EA for ; Tue, 5 Jul 2016 13:28:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.646 X-Spam-Level: X-Spam-Status: No, score=-4.646 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id R2ydedtEAw8t for ; Tue, 5 Jul 2016 13:28:50 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 1C3C25FB35 for ; Tue, 5 Jul 2016 13:28:48 +0000 (UTC) Received: (qmail 51150 invoked by uid 99); 5 Jul 2016 13:28:48 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2016 13:28:48 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 76CC6E01C1; Tue, 5 Jul 2016 13:28:48 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sureshs@apache.org To: commits@trafodion.incubator.apache.org Date: Tue, 05 Jul 2016 13:28:48 -0000 Message-Id: <46dcd60289d0463f868cd20f33397f65@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/5] incubator-trafodion git commit: [TRAFODION-1676]support better runtime error message when a SQL function meet fital error archived-at: Tue, 05 Jul 2016 13:29:05 -0000 Repository: incubator-trafodion Updated Branches: refs/heads/master f1b85eebd -> d3de6851a [TRAFODION-1676]support better runtime error message when a SQL function meet fital error Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/5b8eba55 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5b8eba55 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5b8eba55 Branch: refs/heads/master Commit: 5b8eba5598f8e45339a1ba649cd2214117ed7381 Parents: 4934fde Author: Liu Ming Authored: Wed Jun 29 12:47:38 2016 +0000 Committer: Liu Ming Committed: Wed Jun 29 12:47:38 2016 +0000 ---------------------------------------------------------------------- core/sql/bin/SqlciErrors.txt | 4 +- core/sql/cli/Statement.cpp | 28 ++++ core/sql/exp/exp_conv.cpp | 122 ++++++++++++++-- core/sql/exp/exp_datetime.cpp | 203 +++++++++++++++++++++++++- core/sql/exp/exp_function.cpp | 33 ++++- core/sql/regress/core/EXPECTED038.LINUX | 2 +- core/sql/regress/executor/EXPECTED022.SB | 152 +++++++++---------- core/sql/regress/executor/EXPECTED050 | 4 +- core/sql/regress/hive/EXPECTED005 | 10 +- core/sql/regress/seabase/EXPECTED030 | 6 +- 10 files changed, 453 insertions(+), 111 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/bin/SqlciErrors.txt ---------------------------------------------------------------------- diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt index ec84dd9..6c8933d 100644 --- a/core/sql/bin/SqlciErrors.txt +++ b/core/sql/bin/SqlciErrors.txt @@ -1529,9 +1529,9 @@ $1~String1 -------------------------------- 8410 22025 99999 BEGINNER MINOR LOGONLY An escape character in a LIKE pattern must be followed by another escape character, an underscore, or a percent character. 8411 22003 99999 BEGINNER MINOR LOGONLY A numeric overflow occurred during an arithmetic computation or data conversion.$0~string0 8412 22024 99999 BEGINNER MINOR LOGONLY An input character host variable is missing its null terminator. -8413 22007 99999 BEGINNER MINOR LOGONLY The string argument contains characters that cannot be converted. +8413 22007 99999 BEGINNER MINOR LOGONLY The string argument contains characters that cannot be converted. Source data $0~string0 8414 0A000 99999 BEGINNER MINOR LOGONLY The attempted conversion is not supported on this platform. -8415 22007 99999 BEGINNER MINOR LOGONLY The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +8415 22007 99999 BEGINNER MINOR LOGONLY The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data $0~string0 8416 22008 99999 BEGINNER MINOR LOGONLY A datetime expression evaluated to an invalid datetime value. 8417 ZZZZZ 99999 BEGINNER MAJOR DBADMIN An error occurred during the evaluation of USER function. The provided userid $0~string0 is invalid, incorrect, obsolete or inexistent and could not be converted to username. 8418 0A000 99999 BEGINNER MINOR LOGONLY The USER function is not supported on this platform. http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/cli/Statement.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/Statement.cpp b/core/sql/cli/Statement.cpp index a1f2171..ae59dc0 100644 --- a/core/sql/cli/Statement.cpp +++ b/core/sql/cli/Statement.cpp @@ -2102,6 +2102,30 @@ Statement * Statement::getCurrentOfCursorStatement(char * cursorName) } +////////////////////////////////////////////////////////////////// +//// +//// A helper function to show buffer in HEX +//// +//// /////////////////////////////////////////////////////////////// + +static char *stringToHex(char * out, Int32 outLen, char * in, Int32 inLen) +{ + //clear out buffer first + memset(out,0,outLen); + + outLen = (outLen / 2) ; + + if(inLen < outLen) outLen = inLen; + + char hex[3]; + for(int i = 0; i < outLen; i++) + { + sprintf(hex, "%02x", in[i]); + strcat(out,hex); + } + return out; +} + /////////////////////////////////////////////////////////////////////// // RETURN: doSimCheck: if true, do similarity check. // doFixup: if true and doSimCheck is false, do fixup again. @@ -2298,6 +2322,10 @@ RETCODE Statement::resolveNames(LateNameInfoList * lnil, if (retcode != ex_expr::EXPR_OK) { diagsArea << DgSqlCode(-EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ERROR; } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/exp/exp_conv.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_conv.cpp b/core/sql/exp/exp_conv.cpp index 034c9e3..53f16dd 100644 --- a/core/sql/exp/exp_conv.cpp +++ b/core/sql/exp/exp_conv.cpp @@ -1445,6 +1445,10 @@ ex_expr::exp_return_type convUnicodeToDatetime(char *target, } ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr) , source, sourceLen )); + return ex_expr::EXPR_ERROR; } @@ -1533,6 +1537,9 @@ ex_expr::exp_return_type convDatetimeDatetime(char * target, &roundedDown) != 0) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); return ex_expr::EXPR_ERROR; } @@ -1579,6 +1586,9 @@ ex_expr::exp_return_type convAsciiToFloat64(char * target, // string contains only blanks. ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); return ex_expr::EXPR_ERROR; }; @@ -1730,6 +1740,10 @@ ex_expr::exp_return_type convAsciiToFloat64(char * target, { // string contains only blanks. ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; break; @@ -1748,6 +1762,9 @@ ex_expr::exp_return_type convAsciiToFloat64(char * target, { // LCOV_EXCL_START ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); return ex_expr::EXPR_ERROR; // LCOV_EXCL_STOP }; @@ -1845,6 +1862,10 @@ ex_expr::exp_return_type convAsciiToInt64(Int64 &target, { // syntax error in the input ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; } digitCnt++; @@ -1943,6 +1964,10 @@ ex_expr::exp_return_type convAsciiToInt64(Int64 &target, // or we found a point already. // A sign is an error now! ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; } SignFound = TRUE; @@ -1956,6 +1981,10 @@ ex_expr::exp_return_type convAsciiToInt64(Int64 &target, // we are already not allowing anymore digits because of illegal // blank space(s) ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; } pointFound = TRUE; @@ -1971,6 +2000,10 @@ ex_expr::exp_return_type convAsciiToInt64(Int64 &target, { // 'E' alone is not a valid numeric. ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; } @@ -2004,6 +2037,10 @@ ex_expr::exp_return_type convAsciiToInt64(Int64 &target, { // illegal character in this input string ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; } } @@ -2021,6 +2058,10 @@ ex_expr::exp_return_type convAsciiToInt64(Int64 &target, } ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; } @@ -2165,6 +2206,10 @@ ex_expr::exp_return_type convAsciiToDec(char *target, } ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; // LCOV_EXCL_STOP @@ -2284,6 +2329,10 @@ ex_expr::exp_return_type convAsciiToDec(char *target, // if source is not a digit, we have an error if (source[sourcePos] < '0' || source[sourcePos] > '9') { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; // copy source to target @@ -2540,6 +2589,10 @@ ex_expr::exp_return_type convAsciiFieldToInt64(Int64 &target, { // No digits were found ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; } // return the number of digits read @@ -3384,6 +3437,10 @@ ex_expr::exp_return_type convDecToInt64(Int64 &target, while (currPos < sourceLen) { if (source[currPos] < '0' || source[currPos] > '9') { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; target *= 10; @@ -3433,6 +3490,10 @@ ex_expr::exp_return_type convDecToDec(char *target, // target string is not long enough - overflow ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; @@ -3440,6 +3501,10 @@ ex_expr::exp_return_type convDecToDec(char *target, for (Lng32 i = 1; i < sourceIndex; i++) if (source[i] != '0') { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; str_cpy_all(target, &source[sourceIndex], targetLen); @@ -4342,8 +4407,8 @@ unicodeToSByteTarget( { ExRaiseSqlError(heap, diagsArea, EXE_INVALID_CHAR_IN_TRANSLATE_FUNC); char hexstr[256]; - memset(hexstr,0,256); - *(*diagsArea) << DgString0("UNICODE") << DgString1("ISO88591") << DgString2(stringToHex(hexstr,256,source,sourceLen)); + if(*diagsArea) + *(*diagsArea) << DgString0("UNICODE") << DgString1("ISO88591") << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); retcode = ex_expr::EXPR_ERROR; } } @@ -4440,11 +4505,12 @@ unicodeToMByteTarget( { ExRaiseSqlError(heap, diagsArea, EXE_INVALID_CHAR_IN_TRANSLATE_FUNC); char hexstr[256]; - memset(hexstr,0,256); - if ( targetScale == SQLCHARSETCODE_UTF8 ) - *(*diagsArea) << DgString0("UNICODE") << DgString1("UTF8") << DgString2(stringToHex(hexstr,256,source,sourceLen)); - else - *(*diagsArea) << DgString0("UNICODE") << DgString1("SJIS") << DgString2(stringToHex(hexstr,256,source,sourceLen)); + if( *diagsArea ) { + if ( targetScale == SQLCHARSETCODE_UTF8 ) + *(*diagsArea) << DgString0("UNICODE") << DgString1("UTF8") << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); + else + *(*diagsArea) << DgString0("UNICODE") << DgString1("SJIS") << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); + } retcode = ex_expr::EXPR_ERROR; // LCOV_EXCL_STOP } @@ -4578,8 +4644,8 @@ ex_expr::exp_return_type convCharToChar( if(errCode == EXE_INVALID_CHAR_IN_TRANSLATE_FUNC) { char hexstr[256]; - memset(hexstr,0,256); - *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,256,source,sourceLen)); + if( *diagsArea ) + *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); } if (intermediateStr && intermediateStr != stackBuffer) NADELETEBASIC(intermediateStr, heap); @@ -4721,8 +4787,8 @@ ex_expr::exp_return_type convCharToChar( if(errCode == EXE_INVALID_CHAR_IN_TRANSLATE_FUNC) { char hexstr[256]; - memset(hexstr,0,256); - *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,256,source,sourceLen)); + if( *diagsArea ) + *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); } if (intermediateStr && intermediateStr != stackBuffer) NADELETEBASIC(intermediateStr, heap); @@ -4767,8 +4833,8 @@ ex_expr::exp_return_type convCharToChar( // source string is not valid UTF-8 ExRaiseSqlError(heap, diagsArea, EXE_INVALID_CHAR_IN_TRANSLATE_FUNC); char hexstr[256]; - memset(hexstr,0,256); - *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,256,source,sourceLen)); + if( *diagsArea ) + *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); return ex_expr::EXPR_ERROR; } } @@ -4795,8 +4861,8 @@ ex_expr::exp_return_type convCharToChar( // source string is not valid UTF-8 ExRaiseSqlError(heap, diagsArea, EXE_INVALID_CHAR_IN_TRANSLATE_FUNC); char hexstr[256]; - memset(hexstr,0,256); - *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,256,source,sourceLen)); + if( *diagsArea ) + *(*diagsArea) << DgString0(scaleToString(sourceScale)) << DgString1(scaleToString(targetScale)) << DgString2(stringToHex(hexstr,sizeof(hexstr),source,sourceLen)); return ex_expr::EXPR_ERROR; } @@ -8585,6 +8651,10 @@ convDoIt(char * source, } else { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + if( *diagsArea ) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + ok = ex_expr::EXPR_ERROR; } @@ -8670,6 +8740,9 @@ convDoIt(char * source, ok = ex_expr::EXPR_OK; } else { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + if( *diagsArea ) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); ok = ex_expr::EXPR_ERROR; } @@ -9025,6 +9098,10 @@ convDoIt(char * source, ok = ex_expr::EXPR_OK; } else { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if( *diagsArea ) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + ok = ex_expr::EXPR_ERROR; } @@ -9099,6 +9176,10 @@ convDoIt(char * source, } ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if( *diagsArea ) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; break; @@ -9259,6 +9340,10 @@ convDoIt(char * source, } ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + if( *diagsArea ) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; }; @@ -9299,6 +9384,9 @@ convDoIt(char * source, } ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + if( *diagsArea ) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); return ex_expr::EXPR_ERROR; }; break; @@ -9402,6 +9490,10 @@ convDoIt(char * source, if ( varCharLen ) setVCLength(varCharLen, varCharLenSize, copyLen); ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + if( *diagsArea ) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), source, sourceLen )); + return ex_expr::EXPR_ERROR; // LCOV_EXCL_STOP } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/exp/exp_datetime.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_datetime.cpp b/core/sql/exp/exp_datetime.cpp index 724bdb9..952fba0 100644 --- a/core/sql/exp/exp_datetime.cpp +++ b/core/sql/exp/exp_datetime.cpp @@ -1752,6 +1752,30 @@ containsField(rec_datetime_field field, } } +////////////////////////////////////////////////////////////////// +//// +//// A helper function to show buffer in HEX +//// +//// /////////////////////////////////////////////////////////////// + +static char *stringToHex(char * out, Int32 outLen, char * in, Int32 inLen) +{ + //clear out buffer first + memset(out,0,outLen); + + outLen = (outLen / 2) ; + + if(inLen < outLen) outLen = inLen; + + char hex[3]; + for(int i = 0; i < outLen; i++) + { + sprintf(hex, "%02x", in[i]); + strcat(out,hex); + } + return out; +} + // scanField() ======================================================= // This static helper function for the ExpDatetime class is used to // scan the various fields of a ASCII datetime value. @@ -1908,6 +1932,11 @@ scanField(char *&src, // An unknown character was encountered in the string. // ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_STRING_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + if(*diagsArea) + **diagsArea << DgString0(stringToHex(hexstr, sizeof(hexstr), src, srcEnd-src)); + return FALSE; } } else if (src < srcEnd && isDigit8859_1(*src)) { @@ -1939,7 +1968,8 @@ ExpDatetime::convAsciiToDatetime(char *srcData, { NABoolean noDatetimeValidation = (flags & CONV_NO_DATETIME_VALIDATION) != 0; - + Lng32 originalSrcLen = srcLen; + char * originalSrcData = srcData; // skip leading and trailing blanks and adjust srcData and srcLen // accordingly // @@ -1954,6 +1984,8 @@ ExpDatetime::convAsciiToDatetime(char *srcData, // string contains only blanks. // ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + if(*diagsArea != NULL) + **diagsArea << DgString0("(string contains only blanks)"); return -1; }; @@ -2019,6 +2051,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, // if (format == DATETIME_FORMAT_ERROR) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,originalSrcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2055,6 +2095,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, if ((defZ || TZD) && (dstEndField == REC_DATE_DAY)) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,originalSrcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2151,6 +2199,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, diagsArea, flags)) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,originalSrcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } } @@ -2159,6 +2215,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, // If there are any remaining characters in the input string. if (src != srcEnd) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,originalSrcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2170,6 +2234,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, usaAmPm) { if (datetimeValues[REC_DATE_HOUR] > 12) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,originalSrcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2190,6 +2262,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, } } else if (usaAmPm) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,originalSrcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2240,6 +2320,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, break; default: ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) - 1 ) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,originalSrcData, copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } } @@ -2253,6 +2341,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, dstData, NULL, FALSE, LastDayPrevMonth)) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) - 1 ) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,originalSrcData, copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; }; @@ -2269,6 +2365,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, Int64 juliantimestamp = COMPUTETIMESTAMP(timestamp, &error); if (error) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) - 1 ) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,originalSrcData, copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2317,6 +2421,14 @@ ExpDatetime::convAsciiToDatetime(char *srcData, break; default: ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(originalSrcData); + if(copyLen > sizeof(hexstr) - 1 ) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,originalSrcData, copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } } @@ -2358,6 +2470,8 @@ static NABoolean convertStrToMonth(char* &srcData, char *result, const char * nextByte, CollHeap * heap, ComDiagsArea** diagsArea) { + int copyLen = strlen(srcData); + char * originalSrcData = srcData; const char * months[] = { "JAN", @@ -2390,6 +2504,13 @@ static NABoolean convertStrToMonth(char* &srcData, char *result, { // string contains non-digit ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,originalSrcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return FALSE; // error } srcData++; @@ -2454,6 +2575,14 @@ static short convSrcDataToDst(Lng32 numSrcBytes, char* &srcData, // string contains non-digit // ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if( copyLen > sizeof(hexstr) - 1) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2472,6 +2601,14 @@ static short convSrcDataToDst(Lng32 numSrcBytes, char* &srcData, { // string contains non-digit ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if( copyLen > sizeof(hexstr) - 1) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -2535,6 +2672,14 @@ ExpDatetime::convAsciiToDate(char *srcData, // string contains only blanks. // ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) - 1) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; }; @@ -2554,6 +2699,14 @@ ExpDatetime::convAsciiToDate(char *srcData, // string doesn't seem to contain all date fields. // ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) - 1) + copyLen = sizeof(hexstr) - 1; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; }; @@ -2765,6 +2918,14 @@ ExpDatetime::convAsciiToDate(char *srcData, char * prevSrcData = srcData; if (! convertStrToMonthLongFormat(srcData, &dstData[2])) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1 ; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } minLength += (srcData - prevSrcData); @@ -2932,6 +3093,14 @@ ExpDatetime::convAsciiToDate(char *srcData, // Format could not be determined, issue an error. // ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1 ; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } }; @@ -2945,6 +3114,14 @@ ExpDatetime::convAsciiToDate(char *srcData, // string contains only blanks. // ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1 ; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } } @@ -2959,6 +3136,14 @@ ExpDatetime::convAsciiToDate(char *srcData, dstData, NULL, FALSE, LastDayPrevMonth)) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1 ; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; }; } @@ -3553,6 +3738,14 @@ ExpDatetime::convNumericTimeToASCII(char *srcData, if (format == DATETIME_FORMAT_NUM1) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } @@ -3591,6 +3784,14 @@ ExpDatetime::convNumericTimeToASCII(char *srcData, if (temp > 0) { ExRaiseSqlError(heap, diagsArea, EXE_CONVERT_DATETIME_ERROR); + char hexstr[256]; + memset(hexstr, 0 , sizeof(hexstr) ); + int copyLen = strlen(srcData); + if(copyLen > sizeof(hexstr) -1 ) + copyLen = sizeof(hexstr) -1; + strncpy(hexstr,srcData,copyLen); + if(*diagsArea != NULL) + **diagsArea << DgString0(hexstr); return -1; } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/exp/exp_function.cpp ---------------------------------------------------------------------- diff --git a/core/sql/exp/exp_function.cpp b/core/sql/exp/exp_function.cpp index 4e3211d..d9cda1f 100644 --- a/core/sql/exp/exp_function.cpp +++ b/core/sql/exp/exp_function.cpp @@ -44,6 +44,7 @@ #include #include +#include #include "NLSConversion.h" #include "nawstring.h" @@ -2498,9 +2499,19 @@ ex_expr::exp_return_type ex_function_converttimestamp::eval(char *op_data[], (Int64) 99999999; if ((juliantimestamp < minJuliantimestamp) || (juliantimestamp > maxJuliantimestamp)) { - ExRaiseFunctionSqlError(heap, diagsArea, EXE_CONVERTTIMESTAMP_ERROR, - derivedFunction(), - origFunctionOperType()); + char tmpbuf[24]; + memset(tmpbuf, 0, sizeof(tmpbuf) ); + sprintf(tmpbuf, "%ld", juliantimestamp); + + ExRaiseSqlError(heap, diagsArea, EXE_CONVERTTIMESTAMP_ERROR); + if(*diagsArea) + **diagsArea << DgString0(tmpbuf); + + if(derivedFunction()) + { + **diagsArea << DgSqlCode(-EXE_MAPPED_FUNCTION_ERROR); + **diagsArea << DgString0(exClauseGetText(origFunctionOperType())); + } return ex_expr::EXPR_ERROR; } @@ -2840,9 +2851,19 @@ ex_expr::exp_return_type ex_function_juliantimestamp::eval(char *op_data[], short error; juliantimestamp = COMPUTETIMESTAMP(timestamp, &error); if (error) { - ExRaiseFunctionSqlError(heap, diagsArea, EXE_JULIANTIMESTAMP_ERROR, - derivedFunction(), - origFunctionOperType()); + char tmpbuf[24]; + memset(tmpbuf, 0, sizeof(tmpbuf) ); + sprintf(tmpbuf, "%ld", juliantimestamp); + + ExRaiseSqlError(heap, diagsArea, EXE_JULIANTIMESTAMP_ERROR); + if(*diagsArea) + **diagsArea << DgString0(tmpbuf); + + if(derivedFunction()) + { + **diagsArea << DgSqlCode(-EXE_MAPPED_FUNCTION_ERROR); + **diagsArea << DgString0(exClauseGetText(origFunctionOperType())); + } return ex_expr::EXPR_ERROR; } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/regress/core/EXPECTED038.LINUX ---------------------------------------------------------------------- diff --git a/core/sql/regress/core/EXPECTED038.LINUX b/core/sql/regress/core/EXPECTED038.LINUX index 27eb294..8bb083a 100644 --- a/core/sql/regress/core/EXPECTED038.LINUX +++ b/core/sql/regress/core/EXPECTED038.LINUX @@ -2748,7 +2748,7 @@ B1 --- 0 row(s) selected. >>select * from T038b where b1 < cast('1997-28-02' as DATE) + interval '2' day; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1997-28-02 --- 0 row(s) selected. >> http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/regress/executor/EXPECTED022.SB ---------------------------------------------------------------------- diff --git a/core/sql/regress/executor/EXPECTED022.SB b/core/sql/regress/executor/EXPECTED022.SB index cbe4b2f..4c448c1 100644 --- a/core/sql/regress/executor/EXPECTED022.SB +++ b/core/sql/regress/executor/EXPECTED022.SB @@ -786,17 +786,17 @@ A B C >>-- negative cases >>select cast('2016-01-29Z' as date) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2016-01-29Z --- 0 row(s) selected. >>select cast('2016-01-29+05:00' as date) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2016-01-29+05:00 --- 0 row(s) selected. >>select cast('10:11:12-05:000' as time) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 10:11:12-05:000 --- 0 row(s) selected. >>select date '2016-01-29Z' from t022t1; @@ -825,17 +825,17 @@ A B C >>select cast ('23:11:61' as time) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 23:11:61-05:000 --- 0 row(s) selected. >>select cast ('23:11:06' as timestamp) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 23:11:06 --- 0 row(s) selected. >>select cast('2010-01-01' as time) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2010-01-015:000 --- 0 row(s) selected. >>select timestamp'2010-01-01 10' from t022t1; @@ -2348,28 +2348,28 @@ Hello >>-- illegal european format >>select cast ('12.13.1987' as date) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 12.13.1987 --- 0 row(s) selected. >> >>-- illegal US format >>select cast ('13/12/1987' as date) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 13/12/1987 --- 0 row(s) selected. >> >>-- string overflow >>select cast (cast ('12.07.1961 03:04:55.123456' as timestamp) as char(18)) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 12.07.1961 03:04:55.123456 --- 0 row(s) selected. >> >>-- Feb. 30th doesn't exist >>select cast('1997-30-02' as DATE) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1997-30-02 --- 0 row(s) selected. >> @@ -2718,7 +2718,7 @@ A B >>set param ?p '11/20/1997 15:15:08.123456 am'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 11/20/1997 15:15:08.123456 am *** ERROR[15015] PARAM ?p (value 11/20/1997 15:15:08.123456 am) cannot be converted to type TIMESTAMP(6). @@ -2728,9 +2728,9 @@ A B >>set param ?p '2100-01-01:ab:00:47.250000'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61623a30303a34372e323530303030 -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2100-01-01:ab:00:47.250000 *** ERROR[15015] PARAM ?p (value 2100-01-01:ab:00:47.250000) cannot be converted to type TIMESTAMP(6). @@ -2740,7 +2740,7 @@ A B >>set param ?p '1998-03-12 03:15:08.123456 pm'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1998-03-12 03:15:08.123456 pm *** ERROR[15015] PARAM ?p (value 1998-03-12 03:15:08.123456 pm) cannot be converted to type TIMESTAMP(6). @@ -2750,7 +2750,7 @@ A B >>set param ?p '1996-05-23 16:15:08.123 am'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1996-05-23 16:15:08.123 am *** ERROR[15015] PARAM ?p (value 1996-05-23 16:15:08.123 am) cannot be converted to type TIMESTAMP(6). @@ -2823,9 +2823,9 @@ C1 >>set param ?p '00:a1:00'; >>insert into t022t8 (c2) values ( ?p ); -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61313a3030 -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 00:a1:00 *** ERROR[15015] PARAM ?p (value 00:a1:00) cannot be converted to type TIME(0). @@ -2835,7 +2835,7 @@ C1 >>set param ?p '14:59:59 am'; >>insert into t022t8 (c2) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 14:59:59 am *** ERROR[15015] PARAM ?p (value 14:59:59 am) cannot be converted to type TIME(0). @@ -2845,7 +2845,7 @@ C1 >>set param ?p '11:60:59 am'; >>insert into t022t8 (c2) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 11:60:59 am *** ERROR[15015] PARAM ?p (value 11:60:59 am) cannot be converted to type TIME(0). @@ -3009,64 +3009,64 @@ C1 C2 >>-- negative cases (expect errors) >>select cast('.-2' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2d32 --- 0 row(s) selected. >>select cast('.+3' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2b33 --- 0 row(s) selected. >>select cast('.4-' as numeric(4)) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e342d --- 0 row(s) selected. >>select cast('-. 3' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d2e2033 --- 0 row(s) selected. >>select cast('-3 . ' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d33202e20 --- 0 row(s) selected. >> >>select c1 from t022t8 where cast('.-2' as int) < 1000; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2d32 --- 0 row(s) selected. >>select c1 from t022t8 where cast('.+3' as int) < 1000; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2b33 --- 0 row(s) selected. >>select c1 from t022t8 where cast('.4-' as numeric(4)) < 1; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e342d --- 0 row(s) selected. >>select c1 from t022t8 where cast('-. 3' as int) < 1; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d2e2033 --- 0 row(s) selected. >>select c1 from t022t8 where cast('-3 .' as int) < 1; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d33202e --- 0 row(s) selected. >> >>select cast ('123..' as real) from (values(1)) as T; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3132332e2e --- 0 row(s) selected. >>select cast ('123..12' as real)from (values(1)) as T; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3132332e2e3132 --- 0 row(s) selected. >> @@ -3699,14 +3699,14 @@ Hello >>-- illegal european format >>select cast (N'12.13.1987' as date) from t022u; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 12.13.1987 --- 0 row(s) selected. >> >>-- illegal US format >>select cast (N'13/12/1987' as date) from t022u; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 13/12/1987 --- 0 row(s) selected. >> @@ -3721,7 +3721,7 @@ Hello >>-- Feb. 32th doesn't exist >>select cast(N'1997-02-32' as DATE) from t022u; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1997-02-32 --- 0 row(s) selected. >> @@ -3935,7 +3935,7 @@ Hello >>-- negative test on cast VAR/NCAR to DEC >>select cast(N'1009a' as DEC) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3130303961 --- 0 row(s) selected. >> @@ -3973,17 +3973,17 @@ Hello >>-- negative test on cast VAR/NCAR to float/real/double >>select cast(N'this is not a number.' as float) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 74686973206973206e6f742061206e756d6265722e --- 0 row(s) selected. >>select cast(N'1023u' as real) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3130323375 --- 0 row(s) selected. >>select cast(N'''\2' as double precision) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 275c32 --- 0 row(s) selected. >>?ifNT @@ -5519,17 +5519,17 @@ A B C >>-- negative cases >>select cast('2016-01-29Z' as date) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2016-01-29Z --- 0 row(s) selected. >>select cast('2016-01-29+05:00' as date) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2016-01-29+05:00 --- 0 row(s) selected. >>select cast('10:11:12-05:000' as time) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 10:11:12-05:000 --- 0 row(s) selected. >>select date '2016-01-29Z' from t022t1; @@ -5558,17 +5558,17 @@ A B C >>select cast ('23:11:61' as time) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 23:11:61-05:000 --- 0 row(s) selected. >>select cast ('23:11:06' as timestamp) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 23:11:06 --- 0 row(s) selected. >>select cast('2010-01-01' as time) from t022t1; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2010-01-015:000 --- 0 row(s) selected. >>select timestamp'2010-01-01 10' from t022t1; @@ -7081,28 +7081,28 @@ Hello >>-- illegal european format >>select cast ('12.13.1987' as date) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 12.13.1987 --- 0 row(s) selected. >> >>-- illegal US format >>select cast ('13/12/1987' as date) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 13/12/1987 --- 0 row(s) selected. >> >>-- string overflow >>select cast (cast ('12.07.1961 03:04:55.123456' as timestamp) as char(18)) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 12.07.1961 03:04:55.123456 --- 0 row(s) selected. >> >>-- Feb. 30th doesn't exist >>select cast('1997-30-02' as DATE) from t022t2; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1997-30-02 --- 0 row(s) selected. >> @@ -7451,7 +7451,7 @@ A B >>set param ?p '11/20/1997 15:15:08.123456 am'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 11/20/1997 15:15:08.123456 am *** ERROR[15015] PARAM ?p (value 11/20/1997 15:15:08.123456 am) cannot be converted to type TIMESTAMP(6). @@ -7461,9 +7461,9 @@ A B >>set param ?p '2100-01-01:ab:00:47.250000'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61623a30303a34372e323530303030 -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 2100-01-01:ab:00:47.250000 *** ERROR[15015] PARAM ?p (value 2100-01-01:ab:00:47.250000) cannot be converted to type TIMESTAMP(6). @@ -7473,7 +7473,7 @@ A B >>set param ?p '1998-03-12 03:15:08.123456 pm'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1998-03-12 03:15:08.123456 pm *** ERROR[15015] PARAM ?p (value 1998-03-12 03:15:08.123456 pm) cannot be converted to type TIMESTAMP(6). @@ -7483,7 +7483,7 @@ A B >>set param ?p '1996-05-23 16:15:08.123 am'; >>insert into t022t8 (c1) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1996-05-23 16:15:08.123 am *** ERROR[15015] PARAM ?p (value 1996-05-23 16:15:08.123 am) cannot be converted to type TIMESTAMP(6). @@ -7556,9 +7556,9 @@ C1 >>set param ?p '00:a1:00'; >>insert into t022t8 (c2) values ( ?p ); -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61313a3030 -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 00:a1:00 *** ERROR[15015] PARAM ?p (value 00:a1:00) cannot be converted to type TIME(0). @@ -7568,7 +7568,7 @@ C1 >>set param ?p '14:59:59 am'; >>insert into t022t8 (c2) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 14:59:59 am *** ERROR[15015] PARAM ?p (value 14:59:59 am) cannot be converted to type TIME(0). @@ -7578,7 +7578,7 @@ C1 >>set param ?p '11:60:59 am'; >>insert into t022t8 (c2) values ( ?p ); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 11:60:59 am *** ERROR[15015] PARAM ?p (value 11:60:59 am) cannot be converted to type TIME(0). @@ -7742,64 +7742,64 @@ C1 C2 >>-- negative cases (expect errors) >>select cast('.-2' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2d32 --- 0 row(s) selected. >>select cast('.+3' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2b33 --- 0 row(s) selected. >>select cast('.4-' as numeric(4)) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e342d --- 0 row(s) selected. >>select cast('-. 3' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d2e2033 --- 0 row(s) selected. >>select cast('-3 . ' as int) from t022t8; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d33202e20 --- 0 row(s) selected. >> >>select c1 from t022t8 where cast('.-2' as int) < 1000; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2d32 --- 0 row(s) selected. >>select c1 from t022t8 where cast('.+3' as int) < 1000; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e2b33 --- 0 row(s) selected. >>select c1 from t022t8 where cast('.4-' as numeric(4)) < 1; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2e342d --- 0 row(s) selected. >>select c1 from t022t8 where cast('-. 3' as int) < 1; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d2e2033 --- 0 row(s) selected. >>select c1 from t022t8 where cast('-3 .' as int) < 1; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 2d33202e --- 0 row(s) selected. >> >>select cast ('123..' as real) from (values(1)) as T; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3132332e2e --- 0 row(s) selected. >>select cast ('123..12' as real)from (values(1)) as T; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3132332e2e3132 --- 0 row(s) selected. >> @@ -8432,14 +8432,14 @@ Hello >>-- illegal european format >>select cast (N'12.13.1987' as date) from t022u; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 12.13.1987 --- 0 row(s) selected. >> >>-- illegal US format >>select cast (N'13/12/1987' as date) from t022u; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 13/12/1987 --- 0 row(s) selected. >> @@ -8454,7 +8454,7 @@ Hello >>-- Feb. 32th doesn't exist >>select cast(N'1997-02-32' as DATE) from t022u; -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 1997-02-32 --- 0 row(s) selected. >> @@ -8668,7 +8668,7 @@ Hello >>-- negative test on cast VAR/NCAR to DEC >>select cast(N'1009a' as DEC) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3130303961 --- 0 row(s) selected. >> @@ -8706,17 +8706,17 @@ Hello >>-- negative test on cast VAR/NCAR to float/real/double >>select cast(N'this is not a number.' as float) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 74686973206973206e6f742061206e756d6265722e --- 0 row(s) selected. >>select cast(N'1023u' as real) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 3130323375 --- 0 row(s) selected. >>select cast(N'''\2' as double precision) from t022u; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 275c32 --- 0 row(s) selected. >>?ifNT http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/regress/executor/EXPECTED050 ---------------------------------------------------------------------- diff --git a/core/sql/regress/executor/EXPECTED050 b/core/sql/regress/executor/EXPECTED050 index 2b49aad..43b9571 100755 --- a/core/sql/regress/executor/EXPECTED050 +++ b/core/sql/regress/executor/EXPECTED050 @@ -135,7 +135,7 @@ >>set param ?ee e; >>select * from T050a where d=?ee; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 65 *** ERROR[15015] PARAM ?ee (value e) cannot be converted to type NUMERIC(18, 6). @@ -235,7 +235,7 @@ PARAM ?c aa PARAM ?d foo >>execute x using 77; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 666f6f *** ERROR[15015] PARAM ?d (value foo) cannot be converted to type NUMERIC(18, 6). http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/regress/hive/EXPECTED005 ---------------------------------------------------------------------- diff --git a/core/sql/regress/hive/EXPECTED005 b/core/sql/regress/hive/EXPECTED005 index 0c505e3..e44c6d3 100644 --- a/core/sql/regress/hive/EXPECTED005 +++ b/core/sql/regress/hive/EXPECTED005 @@ -509,7 +509,7 @@ C1 C2 C3 C4 --- SQL operation complete. >>load with NO OUTPUT into trafodion.seabase.tbl_dos_num select * from tbl_dos_num; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 33393437380d --- 0 row(s) loaded. >>cqd HIVE_SCAN_SPECIAL_MODE '1'; @@ -540,7 +540,7 @@ C1 C2 --- SQL operation complete. >>select * from tbl_bad; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61 --- 0 row(s) selected. >>cqd HIVE_SCAN_SPECIAL_MODE '2'; @@ -581,17 +581,17 @@ C1 C2 C3 C4 C --- SQL operation complete. >>load with no output into trafodion.seabase.traf_tbl_bad select * from tbl_bad; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61 --- 0 row(s) loaded. >>insert into trafodion.seabase.traf_tbl_bad select * from tbl_bad; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61 --- 0 row(s) inserted. >>upsert into trafodion.seabase.traf_tbl_bad select * from tbl_bad; -*** ERROR[8413] The string argument contains characters that cannot be converted. +*** ERROR[8413] The string argument contains characters that cannot be converted. Source data 61 --- 0 row(s) inserted. >>cqd HIVE_SCAN_SPECIAL_MODE '2'; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5b8eba55/core/sql/regress/seabase/EXPECTED030 ---------------------------------------------------------------------- diff --git a/core/sql/regress/seabase/EXPECTED030 b/core/sql/regress/seabase/EXPECTED030 index ebdc227..2376f64 100644 --- a/core/sql/regress/seabase/EXPECTED030 +++ b/core/sql/regress/seabase/EXPECTED030 @@ -549,7 +549,7 @@ March 01, 2016, 10:11:12 >>select to_date('0103.2016', 'DD.MM.YYYY') from (values(1)) x(a); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data 0103.2016 --- 0 row(s) selected. >>select to_char('2016-03-01', 'YYYY-MM-DD') from (values(1)) x(a); @@ -603,14 +603,14 @@ March 01, 2016, 10:11:12 >>-- ms4 error cases >>select to_date(123456789, '99:99:99:99') from (values(1)) x(a); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data ? *** ERROR[8001] An internal executor error occurred. --- 0 row(s) selected. >>select to_date(-12345678, '99:99:99:99') from (values(1)) x(a); -*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. +*** ERROR[8415] The provided DATE, TIME, or TIMESTAMP is not valid and cannot be converted. Source data ? *** ERROR[8001] An internal executor error occurred.