Github user sandhyasun commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/889#discussion_r94463262
--- Diff: core/sql/optimizer/SynthType.cpp ---
@@ -6763,19 +6772,28 @@ const NAType *LOBupdate::synthesizeType()
{
// Return blob type
- ValueId vid1 = child(0)->getValueId();
- const NAType &typ1 = (NAType&)vid1.getType();
+ ValueId vid1,vid2 ;
+ const NAType *typ1,*typ2 = NULL;
- ValueId vid2 = child(1)->getValueId();
- const NAType &typ2 = (NAType&)vid2.getType();
+ if(child(0))
+ {
+ vid1= child(0)->getValueId();
+ typ1 = &vid1.getType();
+ }
+
+ if(child(1))
+ {
+ vid2 = child(1)->getValueId();
+ typ2 = &vid2.getType();
+ }
if ((obj_ == STRING_) ||
(obj_ == FILE_) ||
(obj_ == EXTERNAL_))
{
- if (typ1.getTypeQualifier() != NA_CHARACTER_TYPE)
+ if (typ1->getTypeQualifier() != NA_CHARACTER_TYPE)
--- End diff --
Added a check for that.
---
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.
---