[
https://issues.apache.org/jira/browse/TRAFODION-1676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357549#comment-15357549
]
ASF GitHub Bot commented on TRAFODION-1676:
-------------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/564#discussion_r69178912
--- Diff: core/sql/cli/Statement.cpp ---
@@ -2298,6 +2298,10 @@ RETCODE Statement::resolveNames(LateNameInfoList *
lnil,
if (retcode != ex_expr::EXPR_OK)
{
diagsArea << DgSqlCode(-EXE_CONVERT_STRING_ERROR);
+ char hexstr[MAX_OFFENDING_SOURCE_DATA_DISPLAY_LEN];
--- End diff --
Need to allow room for a trailing null. You'll have to declare one more
byte here than you pass as the second parameter to stringToHex. Alternatively,
change the stringToHex function to allow for room (for example, change the
statement "outLen = (outLen / 2)" to "outLen = (outLen / 2) - 1"
> support better runtime error message when a SQL function meet fital error
> -------------------------------------------------------------------------
>
> Key: TRAFODION-1676
> URL: https://issues.apache.org/jira/browse/TRAFODION-1676
> Project: Apache Trafodion
> Issue Type: Improvement
> Components: sql-exe
> Reporter: liu ming
> Assignee: liu ming
> Priority: Minor
>
> A sql contains some SQL function, for example UPPER(), when the input data of
> UPPER() contains invalid data, UPPER() will fail. In this case, the whole
> query abort, and the error message cannot tell which row has invalid data, so
> it is very hard to fix the problem.
> It will be good to have row id or the real value of the error row in the
> error message to help trouble shooting.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)