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

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

Commit 50944811351af142baa75ca0742da58f92407f6d in impala's branch 
refs/heads/dependabot/maven/fe/org.eclipse.jetty-jetty-server-9.4.41.v20210516 
from Daniel Becker
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=509448113 ]

IMPALA-11645: Remove PrintThriftEnum functions in debug-utils.cc

Before IMPALA-5690 we implemented operator<< for Thrift enums in Impala
code. These functions printed the names of the enums.

Then we upgraded to Thrift 0.9.3, but that release included THRIFT-2067,
which implemented operator<< for Thrift enums, but printed the number
value of enums instead of their names. To preserve the old behaviour in
Impala, we renamed our own implementations of operator<< to
PrintThriftEnum, a function that we defined for each Thrift enum we
used, and which returned a string with the names - not the numbers - of
the enums.

After upgrading Thrift to a version that included THRIFT-3921 (any
version starting from 0.11.0), these PrintThriftEnum functions are no
longer necessary as the operator<< provided by Thrift now prints the
names of enums, which is the behaviour we want.

This change removes all PrintThriftEnum functions. At the call sites
where the result of the function call was inserted into a stream, now the
enum is inserted directly (invoking the operator<< provided by Thrift).
At the call sites where a string object is expected, we replaced the
call to PrintThriftEnum with a call to a new function template,
PrintValue(), which converts any object for which operator<< is defined
to a string.

Change-Id: Ie36f6f0f032f3f5c7596929a1eccb80ff16fcd83
Reviewed-on: http://gerrit.cloudera.org:8080/19118
Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> Upgrade Thrift version to 0.9.3
> -------------------------------
>
>                 Key: IMPALA-5690
>                 URL: https://issues.apache.org/jira/browse/IMPALA-5690
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>    Affects Versions: Impala 2.9.0
>            Reporter: Henry Robinson
>            Assignee: Tianyi Wang
>            Priority: Critical
>             Fix For: Impala 3.1.0
>
>
> There are several good reasons to move from Thrift 0.9.0 to 0.9.3, including 
> harmonization with other projects that we link against in one form or another.
> I have started to investigate upgrading, and it's not trivial. Here are the 
> things I've run into:
> 1. 0.9.3 defines operator<< for all Thrift structures, conflicting with some 
> of our bespoke implementations.
> 2. {{TAcceptQueueServer}} is written against an old server interface, and 
> needs to be updated. 
> 3. To build on all the platforms that I care about, a modern Bison install is 
> necessary (this is an issue for native-toolchain, not Apache Impala).



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to