Github user sureshsubbiah commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/291#discussion_r51330150
--- Diff: core/sql/regress/executor/EXPECTED015.SB ---
@@ -1721,4 +1799,70 @@ A B C
--- 1 row(s) selected.
>>
+>>-- guarding against error 7000 and compiler asserts
+>>prepare s1 from UPSERT INTO DEC1
++>(ID, codeValue, title , description, path, synonyms, objectClassCode,
propertyCode)
++>VALUES (NVL((select a.id from DEC1 a where a.codeValue = ?a[10]),
DEFAULT),
++>?b[10], ?c[10], ?d[10], ?e[10], null, ?f[10], null) ;
+
+--- SQL command prepared.
+>>
+>>prepare s2 from UPSERT INTO DEC1
++>(ID, codeValue, title , description, path, synonyms, objectClassCode,
propertyCode)
++>VALUES (?a, ?b, ?c, ?d, ?e, null, ?f, null) ;
+
+--- SQL command prepared.
+>>
+>>prepare s3 from UPSERT INTO DEC1
++>(ID, codeValue, title , description, path, synonyms, objectClassCode,
propertyCode)
++>VALUES (NVL((select a.id from DEC1 a where a.codeValue = ?a), DEFAULT),
++>?b, ?c, ?d, ?e, null, ?f, null) ;
+
+--- SQL command prepared.
+>>
+>>prepare s4 from UPSERT INTO DE
++>(ID, dataElementConceptID, valueDomainID) VALUES
++>(NVL((select a.id from DE a where a.dataElementConceptID =
++>(select b.id from DEC1 b where b.codeValue = ?) and a.valueDomainID = ?
), DEFAULT),
++>NVL((select d.id from DEC1 d where d.codeValue = ?), NULL), ? ) ;
+
+--- SQL command prepared.
+>>
+>>prepare s5 from UPSERT INTO ODT
++>(ID, objectTypeID, dataElementID, objectCategoryTypeCode)
++>VALUES (NVL((select a.id from ODT a where a.objectTypeID =
++>(select b.id from OT b where b.objectCode = ? and b.version = ?) and
++>a.objectCategoryTypeCode = ? and a.dataElementID =
++>(select d.id from DE d where d.dataElementConceptID =
++>(select e.id from DEC1 e where e.codeValue = ?) and d.valueDomainID = ?
) ), DEFAULT),
++>NVL((select g.id from OT g where g.objectCode = ? and g.version = ?),
NULL),
++>NVL((select h.id from DE h where h.dataElementConceptID =
++>(select i.id from DEC1 i where i.codeValue = ?) and h.valueDomainID = ?
), NULL), ? );
+
+--- SQL command prepared.
+>>
+>>prepare s6 from UPSERT INTO DE
++>(ID, dataElementConceptID, valueDomainID) VALUES
++>(NVL((select a.id from DE a where a.dataElementConceptID =
++>(select b.id from DEC1 b where b.codeValue = ?) and a.valueDomainID = ?
), DEFAULT),
++>(select d.id from DEC1 d where d.codeValue = ?), ? ) ;
+
+--- SQL command prepared.
+>>
+>>prepare s7 from UPSERT INTO DE (ID, dataElementConceptID, valueDomainID)
++>VALUES (1, (select d.id from DEC1 d where d.codeValue = ?), 3 ) ;
+
+--- SQL command prepared.
+>>
+>>prepare s8 from UPSERT INTO DE (ID, dataElementConceptID, valueDomainID)
++>VALUES (?[10], ?[10], ?[10] ) ;
+
+--- SQL command prepared.
+>>
+>>prepare s9 from UPSERT INTO DE (ID, dataElementConceptID, valueDomainID)
++>VALUES (1, (select d.id from DEC1 d where d.codeValue = 'aa'), 3 ) ;
+
--- End diff --
Will make this change in my next delivery.
---
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.
---