@Test public void testMatch() { DataModelManager mgr = DataModelManager.getInstance(KylinConfig.getInstanceFromEnv()); DataModelDesc model = mgr.getDataModelDesc("ci_inner_join_model"); JoinsTree joinsTree = model.getJoinsTree(); Map<String, String> matchUp = joinsTree.matches(joinsTree); for (Entry<String, String> e : matchUp.entrySet()) { assertTrue(e.getKey().equals(e.getValue())); } assertTrue(model.getAllTables().size() == matchUp.size()); }
public Map<String, String> matches(JoinsTree another) { return matches(another, Collections.<String, String> emptyMap()); }
JoinsTree implements Serializable { public Map<String, String> matches(JoinsTree another) { return matches(another, Collections.<String, String> emptyMap()); } }
JoinsTree implements Serializable { public Map<String, String> matches(JoinsTree another) { return matches(another, Collections.<String, String> emptyMap()); } JoinsTree(TableRef rootTable, List<JoinDesc> joins);  JoinsTree(Map<String, Chain> tableChains); }
JoinsTree implements Serializable { public Map<String, String> matches(JoinsTree another) { return matches(another, Collections.<String, String> emptyMap()); } JoinsTree(TableRef rootTable, List<JoinDesc> joins);  JoinsTree(Map<String, Chain> tableChains); Map<String, String> matches(JoinsTree another); Map<String, String> matches(JoinsTree another, Map<String, String> constraints); int matchNum(JoinsTree another); JoinDesc getJoinByPKSide(TableRef table); List<Chain> unmatchedChain(JoinsTree another, Map<String, String> constraints); Map<String, Chain> getTableChains(); void setJoinDescMatcher(IJoinDescMatcher joinDescMatcher); JoinsTree getSubgraphByAlias(Set<String> aliases); }
JoinsTree implements Serializable { public Map<String, String> matches(JoinsTree another) { return matches(another, Collections.<String, String> emptyMap()); } JoinsTree(TableRef rootTable, List<JoinDesc> joins);  JoinsTree(Map<String, Chain> tableChains); Map<String, String> matches(JoinsTree another); Map<String, String> matches(JoinsTree another, Map<String, String> constraints); int matchNum(JoinsTree another); JoinDesc getJoinByPKSide(TableRef table); List<Chain> unmatchedChain(JoinsTree another, Map<String, String> constraints); Map<String, Chain> getTableChains(); void setJoinDescMatcher(IJoinDescMatcher joinDescMatcher); JoinsTree getSubgraphByAlias(Set<String> aliases);  }