use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteByKeyWithDynamicParamExpression.
@Test
public void test_deleteByKeyWithDynamicParamExpression() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = CAST(? + 1 AS INT)", table), plan(planRow(0, DeleteByKeyMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteByValue.
@Test
public void test_deleteByValue() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("DELETE FROM m WHERE this = '1'", table), plan(planRow(0, DeleteLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteWithConstantCondition.
@Test
public void test_deleteWithConstantCondition() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("DELETE FROM m WHERE 1 = 1", table), plan(planRow(0, DeleteLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_requiresJob.
@Test
public void test_requiresJob() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = 1", true, table), plan(planRow(0, DeleteLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteByKeyWithDynamicParamAndImplicitCastOnKey.
@Test
public void test_deleteByKeyWithDynamicParamAndImplicitCastOnKey() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = ? + 1", table), plan(planRow(0, DeleteLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
Aggregations