Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/60#discussion_r37244917
--- Diff: core/sql/optimizer/BindItemExpr.cpp ---
@@ -10298,23 +10298,23 @@ NABoolean ZZZBinderFunction::isPadWithSpace
(ExprValueId& padExpr, CharInfo::Cha
if ((padExpr->castToItemExpr()->getOperatorType() == ITM_CONSTANT) &&
(!((ConstValue *)padExpr->castToItemExpr())->getText().isNull()))
{
- NAWString padString(
- ((ConstValue *)padExpr->castToItemExpr())->getConstWStr());
+ NAString padString(
+ ((ConstValue *)padExpr->castToItemExpr())->getConstStr(FALSE));
Int32 i = 0;
NABoolean foundSingleQuote = FALSE;
- for (const NAWchar *s = padString.data(); *s; s++)
+ for (const char *s = padString.data(); *s; s++)
{
- i++; // 0x0027 is the single quote character '
- if ((!foundSingleQuote)&&(*s != 0x0027)) // loop through
+ i++; // 0x27 is the single quote character '
+ if ((!foundSingleQuote)&&(*s != 0x27)) // loop through
--- End diff --
Slightly more portable to code *s != '\'' (it would work in EBCDIC, for
example, while 0x27 would not).
---
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 [email protected] or file a JIRA ticket
with INFRA.
---