[ 
https://issues.apache.org/jira/browse/IMPALA-12717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17822287#comment-17822287
 ] 

ASF subversion and git services commented on IMPALA-12717:
----------------------------------------------------------

Commit c9ecf8d5943f86ba9f6f8efc8f46c11d847b2d9f in impala's branch 
refs/heads/master from Noemi Pap-Takacs
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=c9ecf8d59 ]

IMPALA-12717: Fix error message for missing table descriptor

The error messages for missing table descriptor were malformed due to
incorrect stringstream usage. The message was given in the constructor
and the table id overwrote the beginning the following way:
'ERROR: 0ailed to get table descriptor for table id: '
The solution is not passing any string to the std::stringstream
constructor and using only operator<< instead.

Testing: Built a version locally where the table descriptor was
missing from Iceberg DELETE statement, and verified that the error
message is 'ERROR: Failed to get table descriptor for table id: 0'.

Change-Id: Iae94efe7f60a2de7f4d9ec47ad9d2c1ee8ad0b41
Reviewed-on: http://gerrit.cloudera.org:8080/21084
Reviewed-by: Impala Public Jenkins <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> Fix error message for missing table descriptor
> ----------------------------------------------
>
>                 Key: IMPALA-12717
>                 URL: https://issues.apache.org/jira/browse/IMPALA-12717
>             Project: IMPALA
>          Issue Type: Bug
>          Components: be
>            Reporter: Noemi Pap-Takacs
>            Assignee: Noemi Pap-Takacs
>            Priority: Minor
>              Labels: ErrorMessage, error_message_improvement
>
> HdfsTableSink::Prepare throws an error if the table descriptor is missing.
> The error message should be something like: ‘ERROR: Failed to get table 
> descriptor for table id: 0’
> Instead it looks like: ‘ERROR: 0ailed to get table descriptor for table id:’
> It happens because stringstream operator << overwrites the string in the 
> constructor, in this case the beginning of the message with the table id.
> See: [Difference between constructor and operator << 
> |https://stackoverflow.com/questions/49704052/c-stdstringstream-operator-vs-constructor]
> It would be nice to fix these error messages in the Backend.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to