trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <>
Subject [GitHub] incubator-trafodion pull request: [TRAFODION-2020] Safer APIs to manipulate ...
Date Tue, 31 May 2016 20:36:56 GMT
GitHub user DaveBirdsall opened a pull request:

    [TRAFODION-2020] Safer APIs to manipulate Sql_ParserFlags

    This code change provides new, safer APIs to manipulate the Sql_ParserFlags global.
    Or_SqlParser_Flags is intended to replace Set_SqlParser_Flags. It simply turns on whatever
bits are requested. If the input parameter is zero, it does nothing, in contrast to Set_SqlParser_Flags,
which turns all the bits off in that case.
    UnOr_SqlParser_Flags is intended to replace Reset_SqlParser_Flags. It simply turns off
whatever bits are requested. If the input parameter is zero, it does nothing, in contrast
to Reset_SqlParser_Flags, which turns off all the bits in that case.
    For the common use case of a method that simply wants to turn on a few flags then return
them to their entry-time state, the new class PushAndSetSqlParserFlags is provided. By coding
a single line, one can turn on some flags, and be guaranteed that the flags will return to
their original value at method exit (provided exit is via normal flow or via C++ exceptions).
Thanks to @nonstop-qfchen and @selvaganesang for suggesting this idea.
    This code change also changes the Update Statistics code to use this new class, replacing
calls to the older APIs. Over time all calls to the older APIs can be replaced.

You can merge this pull request into a Git repository by running:

    $ git pull Trafodion2020

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #512
commit b7fff131c11997de1644ad21a2e7bf4ff5e0c707
Author: Dave Birdsall <>
Date:   2016-05-31T20:28:54Z

    [TRAFODION-2020] Safer APIs to manipulate Sql_ParserFlags


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message