Github user zellerh commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/60#discussion_r37246397
  
    --- 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 
              continue;  // the prefix _UCS2 or _ISO88591
            else if ((!foundSingleQuote))
            {
             foundSingleQuote = TRUE; // found the leading single quote.
             continue;
            }
    -       if ((i == (padString.length())) && (*s == 0x0027)) // trailing 
single quote
    +       if ((i == (padString.length())) && (*s == 0x27)) // trailing single 
quote
              continue;
    -       if (*s != 0x0020) // 0x0020 is the single space character ' '
    +       if (*s != 0x20) // 0x20 is the single space character ' '
    --- End diff --
    
    Done.


---
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.
---

Reply via email to