use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteByKeyAndKey.
@Test
public void test_deleteByKeyAndKey() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = 1 AND __key = 2", table), plan(planRow(0, DeleteLogicalRel.class), planRow(1, ValuesLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteByKeyWithDynamicParam.
@Test
@Parameters(method = "types")
public void test_deleteByKeyWithDynamicParam(QueryDataType type) {
HazelcastTable table = partitionedTable("m", asList(field(KEY, type), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = ?", 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_deleteByKeyOrKey.
@Test
public void test_deleteByKeyOrKey() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = 1 OR __key = 2", 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_deleteWithoutWhere.
@Test
public void test_deleteWithoutWhere() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("DELETE FROM m", 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 LogicalSelectTest method test_selectByKeyAndValue.
@Test
public void test_selectByKeyAndValue() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("SELECT * FROM m WHERE __key = 1 AND this = '1'", table), plan(planRow(0, FullScanLogicalRel.class)));
}
Aggregations