Browse Source

HPCC-18767 ASSERT(dataval = otherdataval) problems

Helps workaround issues with data=>utf8 casts, but also is a good idea in
general as the output values are not especially helpful.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 7 years ago
parent
commit
87857abf38
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);
     if (!lhs->queryType()->isScalar() || !rhs->queryType()->isScalar())
         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;
     prefix.append("Assert (");