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 @@ -838,30 +838,30 @@ public void testNonImplicitCastOnSymbolSide()
// we expect TupleDomain.all here().
// see comment in DomainTranslator.Visitor.visitComparisonExpression()
assertUnsupportedPredicate(equal(
new Cast(C_TIMESTAMP.toSymbolReference(), toSqlType(DATE)),
cast(C_TIMESTAMP, DATE),
toExpression(DATE_VALUE, DATE)));
assertUnsupportedPredicate(equal(
new Cast(C_DECIMAL_12_2.toSymbolReference(), toSqlType(BIGINT)),
cast(C_DECIMAL_12_2, BIGINT),
bigintLiteral(135L)));
}

@Test
public void testNoSaturatedFloorCastFromUnsupportedApproximateDomain()
{
assertUnsupportedPredicate(equal(
new Cast(C_DECIMAL_12_2.toSymbolReference(), toSqlType(DOUBLE)),
cast(C_DECIMAL_12_2, DOUBLE),
toExpression(12345.56, DOUBLE)));

assertUnsupportedPredicate(equal(
new Cast(C_BIGINT.toSymbolReference(), toSqlType(DOUBLE)),
cast(C_BIGINT, DOUBLE),
toExpression(12345.56, DOUBLE)));

assertUnsupportedPredicate(equal(
new Cast(C_BIGINT.toSymbolReference(), toSqlType(REAL)),
cast(C_BIGINT, REAL),
toExpression(realValue(12345.56f), REAL)));

assertUnsupportedPredicate(equal(
new Cast(C_INTEGER.toSymbolReference(), toSqlType(REAL)),
cast(C_INTEGER, REAL),
toExpression(realValue(12345.56f), REAL)));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public QueryAssert matches(MaterializedResult expected)
});
}

public final QueryAssert matches(PlanMatchPattern expectedPlan)
public QueryAssert matches(PlanMatchPattern expectedPlan)
{
transaction(runner.getTransactionManager(), runner.getAccessControl())
.execute(session, session -> {
Expand Down Expand Up @@ -471,7 +471,7 @@ public final QueryAssert isNotFullyPushedDown(Class<? extends PlanNode>... retai
* <b>Note:</b> the primary intent of this assertion is to ensure the test is updated to {@link #isFullyPushedDown()}
* when pushdown capabilities are improved.
*/
public final QueryAssert isNotFullyPushedDown(PlanMatchPattern retainedSubplan)
public QueryAssert isNotFullyPushedDown(PlanMatchPattern retainedSubplan)
{
PlanMatchPattern expectedPlan = PlanMatchPattern.anyTree(retainedSubplan);

Expand All @@ -489,12 +489,12 @@ public final QueryAssert isNotFullyPushedDown(PlanMatchPattern retainedSubplan)
* Verifies query has the expected plan and that results are the same as when pushdown is fully disabled.
*/
@CanIgnoreReturnValue
public final QueryAssert hasPlan(PlanMatchPattern expectedPlan)
public QueryAssert hasPlan(PlanMatchPattern expectedPlan)
{
return hasPlan(expectedPlan, plan -> {});
}

private final QueryAssert hasPlan(PlanMatchPattern expectedPlan, Consumer<Plan> additionalPlanVerification)
private QueryAssert hasPlan(PlanMatchPattern expectedPlan, Consumer<Plan> additionalPlanVerification)
{
transaction(runner.getTransactionManager(), runner.getAccessControl())
.execute(session, session -> {
Expand Down