use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalInsertTest method test_insertSelect.
@Test
public void test_insertSelect() {
HazelcastTable target = partitionedTable("m1", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
HazelcastTable source = partitionedTable("m2", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
assertPlan(optimizeLogical("INSERT INTO m1 SELECT * FROM m2", target, source), plan(planRow(0, InsertLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSinkTest method test_sinkSelect.
@Test
public void test_sinkSelect() {
HazelcastTable target = partitionedTable("m1", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
HazelcastTable source = partitionedTable("m2", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
assertPlan(optimizeLogical("SINK INTO m1 SELECT * FROM m2", target, source), plan(planRow(0, SinkLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSinkTest method test_sinkValues.
@Test
public void test_sinkValues() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
assertPlan(optimizeLogical("SINK INTO m VALUES (1, '1'), (2, '2')", table), plan(planRow(0, SinkMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalUpdateTest method test_updateWithoutWhere.
@Test
public void test_updateWithoutWhere() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("UPDATE m SET this = '2'", table), plan(planRow(0, UpdateLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteByKeyAndValue.
@Test
public void test_deleteByKeyAndValue() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = 1 AND this = '1'", table), plan(planRow(0, DeleteLogicalRel.class), planRow(1, FullScanLogicalRel.class)));
}
Aggregations