Skip to content

Commit

Permalink
HPCC-33054 Codegen support KEYED JOIN where rhs may evaluate to a nul…
Browse files Browse the repository at this point in the history
…l dataset

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
  • Loading branch information
ghalliday committed Nov 29, 2024
1 parent 3e17a7a commit 8d87978
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion ecl/hqlcpp/hqlckey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,16 @@ IHqlExpression * queryBaseIndexForKeyedJoin(IHqlExpression * expr)
IHqlExpression * left = queryBaseIndexForKeyedJoin(expr->queryChild(1));
IHqlExpression * right = queryBaseIndexForKeyedJoin(expr->queryChild(2));
if (left && right)
return left;
{
//IF (cond, index) and IF(cond, null, index) should be allowed, and will return the index
if (left->getOperator() != no_null)
return left;
return right;
}
return nullptr;
}
if (expr->getOperator() == no_null)
return expr;
return queryPhysicalRootTable(expr);
}

Expand Down

0 comments on commit 8d87978

Please sign in to comment.