Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public CastExpr(Type targetType, Expr e) {
try {
analyze();
} catch (AnalysisException ex) {
LOG.warn("Implicit casts fail", ex);
Preconditions.checkState(false,
"Implicit casts should never throw analysis exception.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static Expr wrapExpr(Expr expr, List<TupleId> tids, Analyzer analyzer)
* Throws an InternalException if expr evaluation in the BE failed.
*/
private static boolean requiresNullWrapping(Expr expr, Analyzer analyzer) {
if (expr.isConstant()) {
if (expr.isConstant() || expr.getType().isNull()) {
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,4 +343,11 @@ public void testMultrGroupByInCorrelationSubquery() throws Exception {
String sql = "SELECT * from baseall where k1 > (select min(k1) from tbl1 where baseall.k1 = tbl1.k4 and baseall.k2 = tbl1.k2)";
dorisAssert.query(sql).explainQuery();
}

@Test
public void testOuterJoinNullUnionView() throws Exception{
String sql = "WITH test_view(k) AS(SELECT NULL AS k UNION ALL SELECT NULL AS k )\n" +
"SELECT v1.k FROM test_view AS v1 LEFT OUTER JOIN test_view AS v2 ON v1.k=v2.k";
dorisAssert.query(sql).explainQuery();
}
}