use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalDeleteTest method test_deleteByKeyWithLiteral.
@Test
@Parameters(method = "literals")
public void test_deleteByKeyWithLiteral(QueryDataType type, String literalValue) {
HazelcastTable table = partitionedTable("m", asList(field(KEY, type), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("DELETE FROM m WHERE __key = " + literalValue, table), plan(planRow(0, DeleteByKeyMapLogicalRel.class)));
assertPlan(optimizeLogical("DELETE FROM m WHERE " + literalValue + " = __key", table), plan(planRow(0, DeleteByKeyMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSelectTest method test_selectByKeyWithProject.
@Test
public void test_selectByKeyWithProject() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("SELECT this FROM m WHERE __key = 1", table), plan(planRow(0, SelectByKeyMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSelectTest method test_selectByKeyWithLiteralExpression.
@Test
public void test_selectByKeyWithLiteralExpression() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("SELECT * FROM m WHERE __key = 1 + 1", table), plan(planRow(0, SelectByKeyMapLogicalRel.class)));
}
use of com.hazelcast.jet.sql.impl.schema.HazelcastTable in project hazelcast by hazelcast.
the class LogicalSelectTest method test_selectByKeyWithDynamicParamAndImplicitCastOnKey.
@Test
public void test_selectByKeyWithDynamicParamAndImplicitCastOnKey() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("SELECT * FROM m WHERE __key = ? + 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_selectByKeyWithDynamicParamExpression.
@Test
public void test_selectByKeyWithDynamicParamExpression() {
HazelcastTable table = partitionedTable("m", asList(field(KEY, INT), field(VALUE, VARCHAR)), 1);
assertPlan(optimizeLogical("SELECT * FROM m WHERE __key = CAST(? + 1 AS INT)", table), plan(planRow(0, SelectByKeyMapLogicalRel.class)));
}
Aggregations