Browse Source

Merge pull request #10662 from richardkchapman/assert_data

HPCC-18767 ASSERT(dataval = otherdataval) problems

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Gavin Halliday 7 years ago
parent
commit
2b7968c894
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ecl/hql/hqlutil.cpp

+ 2 - 0
ecl/hql/hqlutil.cpp

@@ -7707,6 +7707,8 @@ IHqlExpression * createDefaultAssertMessage(IHqlExpression * cond)
     IHqlExpression * rhs = cond->queryChild(1);
     IHqlExpression * rhs = cond->queryChild(1);
     if (!lhs->queryType()->isScalar() || !rhs->queryType()->isScalar())
     if (!lhs->queryType()->isScalar() || !rhs->queryType()->isScalar())
         return createConstant(temp.append("Assert failed: ").append(suffix));
         return createConstant(temp.append("Assert failed: ").append(suffix));
+    if (lhs->queryType()->getTypeCode() == type_data || rhs->queryType()->getTypeCode() == type_data)
+        return createConstant(temp.append("Assert failed: ").append(suffix));
 
 
     StringBuffer prefix;
     StringBuffer prefix;
     prefix.append("Assert (");
     prefix.append("Assert (");