use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSelectTest method test_selectByValue.
@Test
public void test_selectByValue() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("SELECT * FROM m WHERE this = '1'", table), plan(planRow(0, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSelectTest method test_selectWithConstantCondition.
@Test
public void test_selectWithConstantCondition() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 10);
assertPlan(optimizeLogical("SELECT * FROM m WHERE 1 = 1", table), plan(planRow(0, FullScanLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSelectTest method test_selectByKeyWithLiteral.
@Test
@Parameters(method = "literals")
public void test_selectByKeyWithLiteral(QueryDataType type, String literalValue) {
HazelcastTable table = partitionedTable("m", asList(field(KEY, type), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("SELECT * FROM m WHERE __key = " + literalValue, table), plan(planRow(0, SelectByKeyMapLogicalRel.class)));
assertPlan(optimizeLogical("SELECT * FROM m WHERE " + literalValue + " = __key", table), plan(planRow(0, SelectByKeyMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalInsertTest method test_insertValues.
@Test
public void test_insertValues() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
assertPlan(optimizeLogical("INSERT INTO m VALUES (1, '1')", table), plan(planRow(0, InsertMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalInsertTest method test_insertMultiValues.
@Test
public void test_insertMultiValues() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 0);
assertPlan(optimizeLogical("INSERT INTO m VALUES (1, '1'), (2, '2')", table), plan(planRow(0, InsertLogicalRel.class), planRow(1, ValuesLogicalRel.class)));
}
Aggregations