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 @@ -579,6 +579,10 @@ public void postorder(DBSPUnaryExpression expression) {
!cast.source.getType().mayBeNull) {
result = cast.source;
}
} else if (source.is(DBSPBoolLiteral.class)) {
DBSPBoolLiteral b = source.to(DBSPBoolLiteral.class);
boolean r = b.value != null && b.value;
result = new DBSPBoolLiteral(expression.getNode(), expression.getType(), r);
} else {
result = this.pushIntoConditional(source, expression, result);
}
Expand Down
4 changes: 4 additions & 0 deletions sql-to-dbsp-compiler/slt/skip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ SELECT ALL - ( 27 ) * - 92 / + + 0 / CASE + ( + 27 ) WHEN - 36 THEN NULL WHEN -
SELECT + MIN ( 95 ) / - + 0 * + CASE - - COUNT ( + 54 ) WHEN + 27 * + ( - - 48 ) - - 45 THEN COUNT ( * ) * + 21 ELSE NULL END * 41
// test/random/expr/slt_good_100.test: test 8766, division by zero
SELECT ALL - 29 * + 42 - + + 30 / - - 0 / CASE + 46 WHEN - 96 + - + 73 THEN NULL WHEN 94 THEN - NULLIF ( 37, 90 ) END - - 97
// test/random/expr/slt_good_24.test: test 6834: overflow in integer multiplication. Same result produced by Postgres
SELECT + - NULLIF ( CAST ( NULL AS REAL ), - - ( + 87 ) + 95 ) + - - COUNT ( * ) * - + 85 AS col1, - CAST ( - SUM ( DISTINCT + 79 ) AS INTEGER ) + - + CASE - - 4 WHEN + - NULLIF ( + 75, 13 ) + - 98 + - + 96 * - 52 + 87 * + ( - 92 ) * + 34 * 5 * - ( 29 ) * + 92 * + - 81 / NULLIF ( - CASE + 4 WHEN + + 88 THEN + 87 ELSE + CAST ( + + 90 AS REAL ) + 54 END, + - 35 - - + 70 ) + + 89 * + 92 + + + AVG ( DISTINCT - 11 ) THEN NULL ELSE 40 END, - 6 AS col1
// test/random/expr/slt_good_24.test: test 8150: overflow in integer multiplication. Same result produced by Postgres
SELECT + 41 + - 61 + - ( + + 35 ) + + 83 - 35 - + + CAST ( 55 AS INTEGER ) * + - 70 * - 75 * - 20 * - CASE - 11 WHEN SUM ( ALL - 35 ) * - CASE - ( - 83 ) WHEN 40 THEN + 72 + 2 END THEN NULL ELSE - 73 * 52 END * + CASE 59 WHEN 92 + AVG ( 19 ) THEN 36 / - 77 + + 90 * 96 END
Loading