QueryPlan plan = pstmt.optimizeQuery();
Scan scan = plan.getContext().getScan();
Filter filter = scan.getFilter();
assertEquals(
new RowKeyComparisonFilter(
constantComparison(CompareOp.EQUAL,
new SubstrFunction(
Arrays.<Expression>asList(
new RowKeyColumnExpression(BaseConnectionlessQueryTest.ENTITY_ID,new RowKeyValueAccessor(BaseConnectionlessQueryTest.ATABLE.getPKColumns(),1)),
LiteralExpression.newConstant(1),