@Test public void testForRange() { String sql = "SELECT column1 as rcol1, column2 as rcol2, column3, qcol1 as direct1 FROM myTable tbl where rcol1 > 10 and column2 < 30 or (column3 != 25 and direct1 = 30)"; LogicalPlan plan = getLogicalPlan(sql); DummyPhysicalPlan physicalPlan = new DummyPhysicalPlan("dummyPlan", plan); WhereClause actual = physicalPlan.getWhereClause(); WhereClause expected = buildRangeAndDirectWhereClause(); assertEquals(expected, actual); }
public WhereClause getWhereClause() { return whereClause; }
PhysicalPlan extends TreeNode { public WhereClause getWhereClause() { return whereClause; } }
PhysicalPlan extends TreeNode { public WhereClause getWhereClause() { return whereClause; } PhysicalPlan(String description, LogicalPlan logicalPlan); }
PhysicalPlan extends TreeNode { public WhereClause getWhereClause() { return whereClause; } PhysicalPlan(String description, LogicalPlan logicalPlan); WhereClause getWhereClause(); Map<String, String> getColumnAliasMapping(); List<SelectItem> getSelectItems(); boolean validateLogicalPlan(); Color validateNode(TreeNode node); PhysicalPlan paginate(RangeNode<?> rangeNode); abstract List<String> getRangeCols(String table); abstract List<String> getQueryCols(String table); abstract RangeOperations<?> getRangeOperations(String table, String column); abstract boolean tableExists(String table); abstract boolean columnExists(String table, String column); abstract Map<String, Integer> getColumnTypeMap(String table); @Override Object clone(); boolean checkFilterNull(Comparator cmp, String value); boolean isFilterWithNull(FilterItem filterItem); }
PhysicalPlan extends TreeNode { public WhereClause getWhereClause() { return whereClause; } PhysicalPlan(String description, LogicalPlan logicalPlan); WhereClause getWhereClause(); Map<String, String> getColumnAliasMapping(); List<SelectItem> getSelectItems(); boolean validateLogicalPlan(); Color validateNode(TreeNode node); PhysicalPlan paginate(RangeNode<?> rangeNode); abstract List<String> getRangeCols(String table); abstract List<String> getQueryCols(String table); abstract RangeOperations<?> getRangeOperations(String table, String column); abstract boolean tableExists(String table); abstract boolean columnExists(String table, String column); abstract Map<String, Integer> getColumnTypeMap(String table); @Override Object clone(); boolean checkFilterNull(Comparator cmp, String value); boolean isFilterWithNull(FilterItem filterItem);  }