@Test public void testBasics() { DataModelManager mgr = DataModelManager.getInstance(KylinConfig.getInstanceFromEnv()); DataModelDesc model = mgr.getDataModelDesc("ci_left_join_model"); JoinsTree joinsTree = model.getJoinsTree(); Chain chain = joinsTree.getTableChains().get("BUYER_COUNTRY"); assertTrue(chain.table == model.findTable("BUYER_COUNTRY")); assertTrue(chain.fkSide.table == model.findTable("BUYER_ACCOUNT")); assertTrue(chain.fkSide.fkSide.table == model.findTable("TEST_ORDER")); assertTrue(chain.fkSide.fkSide.fkSide.table == model.findTable("TEST_KYLIN_FACT")); assertTrue(chain.fkSide.fkSide.fkSide.join == null); assertTrue(chain.fkSide.fkSide.fkSide.fkSide == null); }
public Map<String, Chain> getTableChains() { return tableChains; }
JoinsTree implements Serializable { public Map<String, Chain> getTableChains() { return tableChains; } }
JoinsTree implements Serializable { public Map<String, Chain> getTableChains() { return tableChains; } JoinsTree(TableRef rootTable, List<JoinDesc> joins);  JoinsTree(Map<String, Chain> tableChains); }
JoinsTree implements Serializable { public Map<String, Chain> getTableChains() { return tableChains; } 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, Chain> getTableChains() { return tableChains; } 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);  }