/** * Remove the join chain with name specified * * @param chainName chain name */ public boolean removeJoinChain(String chainName) { if (chainMap.containsKey(chainName.toLowerCase())) { joinChains.remove(getChainByName(chainName)); chainMap.remove(chainName.toLowerCase()); MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains); return true; } return false; }
/** * Remove the join chain with name specified * * @param chainName chain name */ public boolean removeJoinChain(String chainName) { if (chainMap.containsKey(chainName.toLowerCase())) { joinChains.remove(getChainByName(chainName)); chainMap.remove(chainName.toLowerCase()); MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains); return true; } return false; }
public AbstractBaseTable(Table tbl) { super(tbl); this.expressions = getExpressions(getName(), getProperties()); exprMap = new HashMap<>(); for (ExprColumn expr : expressions) { exprMap.put(expr.getName().toLowerCase(), expr); } this.joinChains = getJoinChains(this, getJoinChainListPropKey(getName()), getProperties()); chainMap = new HashMap<>(); for (JoinChain chain : joinChains) { chainMap.put(chain.getName().toLowerCase(), chain); } }
public AbstractBaseTable(Table tbl) { super(tbl); this.expressions = getExpressions(getName(), getProperties()); exprMap = new HashMap<>(); for (ExprColumn expr : expressions) { exprMap.put(expr.getName().toLowerCase(), expr); } this.joinChains = getJoinChains(this, getJoinChainListPropKey(getName()), getProperties()); chainMap = new HashMap<>(); for (JoinChain chain : joinChains) { chainMap.put(chain.getName().toLowerCase(), chain); } }
/** * Alters the joinchain if already existing or just adds if it is new chain * * @param joinchain join chain */ public void alterJoinChain(JoinChain joinchain) { if (joinchain == null) { throw new NullPointerException("Cannot add null joinchain"); } // Replace dimension if already existing if (chainMap.containsKey(joinchain.getName().toLowerCase())) { joinChains.remove(getChainByName(joinchain.getName())); log.info("Replacing joinchain {} with {}", getChainByName(joinchain.getName()), joinchain); } joinChains.add(joinchain); chainMap.put(joinchain.getName().toLowerCase(), joinchain); MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains); joinchain.addProperties(this); }
/** * Alters the joinchain if already existing or just adds if it is new chain * * @param joinchain join chain */ public void alterJoinChain(JoinChain joinchain) { if (joinchain == null) { throw new NullPointerException("Cannot add null joinchain"); } // Replace dimension if already existing if (chainMap.containsKey(joinchain.getName().toLowerCase())) { joinChains.remove(getChainByName(joinchain.getName())); log.info("Replacing joinchain {} with {}", getChainByName(joinchain.getName()), joinchain); } joinChains.add(joinchain); chainMap.put(joinchain.getName().toLowerCase(), joinchain); MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains); joinchain.addProperties(this); }
@Override public void addProperties() { super.addProperties(); MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getExpressionListKey(getName()), expressions); setExpressionProperties(getProperties(), expressions); MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains); setJoinChainProperties(joinChains); }
@Override public void addProperties() { super.addProperties(); MetastoreUtil.addNameStrings(getProperties(), MetastoreUtil.getExpressionListKey(getName()), expressions); setExpressionProperties(getProperties(), expressions); MetastoreUtil.addNameStrings(getProperties(), getJoinChainListPropKey(getName()), joinChains); setJoinChainProperties(joinChains); }