Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/1022#discussion_r108300447
--- Diff: core/sql/optimizer/BindItemExpr.cpp ---
@@ -6173,7 +6173,35 @@ ItemExpr *Assign::bindNode(BindWA *bindWA)
} // QSTUFF
} // isUserSpecified
+ NABuiltInTypeEnum sourceType =
child(1)->castToItemExpr()->getValueId().getType().getTypeQualifier() ;
+ NABuiltInTypeEnum targetType =
child(0)->castToItemExpr()->getValueId().getType().getTypeQualifier() ;
+ if ((sourceType == NA_CHARACTER_TYPE) && (targetType == NA_LOB_TYPE))
+ {
+ ValueId vid1 = child(1)->castToItemExpr()->getValueId();
+ // Add a stringToLob node
+ ItemExpr *newChild = new (bindWA->wHeap()) LOBinsert(
vid1.getItemExpr(), NULL, LOBoper::STRING_, FALSE);
+ newChild->bindNode(bindWA);
+ if (bindWA->errStatus())
+ return boundExpr;
+ setChild(1, newChild);
+ }
+ /* if ((sourceType == NA_UNKNOWN_TYPE) && (targetType = NA_LOB_TYPE))
--- End diff --
I think there was a CQD added awhile back that caused params to be treated
as strings. Perhaps this commented code was intended to handle the case where
the CQD is set to 'OFF'?
---
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.
---