use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSinkTest method test_requiresJob.
@Test
public void test_requiresJob() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
assertPlan(optimizeLogical("SINK INTO m VALUES (1, '1'), (2, '2')", true, table), plan(planRow(0, SinkLogicalRel.class), planRow(1, ValuesLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalUpdateTest method test_updateByKeyWithLiteralExpression.
@Test
public void test_updateByKeyWithLiteralExpression() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("UPDATE m SET this = '2' WHERE __key = 1 + 1", table), plan(planRow(0, UpdateByKeyMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalUpdateTest method test_updateByKeyWithDynamicParamExpression.
@Test
public void test_updateByKeyWithDynamicParamExpression() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("UPDATE m SET this = '2' WHERE __key = CAST(? + 1 AS INT)", table), plan(planRow(0, UpdateByKeyMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalUpdateTest method test_updateByKeyAndValue.
@Test
public void test_updateByKeyAndValue() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("UPDATE m SET this = '2' WHERE __key = 1 AND this = '1'", 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 LogicalUpdateTest method test_updateByKeyAndKey.
@Test
public void test_updateByKeyAndKey() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("UPDATE m SET this = '2' WHERE __key = 1 AND __key = 2", table), plan(planRow(0, UpdateLogicalRel.class), planRow(1, ValuesLogicalRel.class)));
}
Aggregations