Package com.taobao.tddl.interact.rule.Samples

Examples of com.taobao.tddl.interact.rule.Samples.SamplesCtx


  }

  private Map<String, Set<String>> crossNoSourceKey1(Rule<String> matchedDbRule,
      Map<String, Comparative> matchedDbRuleArgs, Rule<String> matchedTbRule,
      Map<String, Comparative> matchedTbRuleArgs, String[] commonColumn, Object outerCtx) {
    SamplesCtx dbRuleCtx = null; //���ڱ������������������ͬ���������Ͳ�ͬ���У������ö�ٽ�����������ö�ټ�
    Set<AdvancedParameter> diifTypeInCommon = diifTypeInCommon(matchedDbRule, matchedTbRule, commonColumn);
    if (diifTypeInCommon != null && !diifTypeInCommon.isEmpty()) {
      //�����а�����ö�����Ͳ�ͬ���У��������1_month����ʾ1_day
      Map<String, Set<Object>> tbTypes = RuleUtils.getSamplingField(matchedTbRuleArgs, diifTypeInCommon);
      dbRuleCtx = new SamplesCtx(new Samples(tbTypes), SamplesCtx.merge);
    }
    Map<String, Samples> dbValues = cast(matchedDbRule.calculate(matchedDbRuleArgs, dbRuleCtx, outerCtx));
    Map<String, Set<String>> topology = new HashMap<String, Set<String>>(dbValues.size());
    for (Map.Entry<String, Samples> e : dbValues.entrySet()) {
      SamplesCtx tbRuleCtx = new SamplesCtx(e.getValue().subSamples(commonColumn), SamplesCtx.replace);
      Set<String> tbValues = matchedTbRule.calculateNoTrace(matchedTbRuleArgs, tbRuleCtx, outerCtx);
      topology.put(e.getKey(), tbValues);
    }
    return topology;
  }
View Full Code Here


  }

  private Map<String, Map<String, Field>> crossWithSourceKey1(Rule<String> matchedDbRule,
      Map<String, Comparative> matchedDbRuleArgs, Rule<String> matchedTbRule,
      Map<String, Comparative> matchedTbRuleArgs, String[] commonColumn, Object outerCtx) {
    SamplesCtx dbRuleCtx = null; //���ڱ������������������ͬ���������Ͳ�ͬ���У������ö�ٽ�����������ö�ټ�
    Set<AdvancedParameter> diifTypeInCommon = diifTypeInCommon(matchedDbRule, matchedTbRule, commonColumn);
    if (diifTypeInCommon != null && !diifTypeInCommon.isEmpty()) {
      //�����а�����ö�����Ͳ�ͬ���У��������1_month����ʾ1_day
      Map<String, Set<Object>> tbTypes = RuleUtils.getSamplingField(matchedTbRuleArgs, diifTypeInCommon);
      dbRuleCtx = new SamplesCtx(new Samples(tbTypes), SamplesCtx.merge);
    }
    Map<String, Samples> dbValues = cast(matchedDbRule.calculate(matchedDbRuleArgs, dbRuleCtx, outerCtx));
    Map<String, Map<String, Field>> topology = new HashMap<String, Map<String, Field>>(dbValues.size());
    for (Map.Entry<String, Samples> e : dbValues.entrySet()) {
      SamplesCtx tbRuleCtx = new SamplesCtx(e.getValue().subSamples(commonColumn), SamplesCtx.replace);
      Map<String, Samples> tbValues = cast(matchedTbRule.calculate(matchedTbRuleArgs, tbRuleCtx, outerCtx));
      topology.put(e.getKey(), toMapField(tbValues));
    }
    return topology;
  }
View Full Code Here

  }

  private Map<String, Set<Object>> getEnumerates(Map<String, Comparative> sqlArgs, Object ctx) {
    Set<AdvancedParameter> thisParam = cast(this.parameterSet);
    Map<String, Set<Object>> enumerates;
    SamplesCtx samplesCtx = (SamplesCtx) ctx;
    if (samplesCtx != null) {
      Samples commonSamples = samplesCtx.samples;
      if (samplesCtx.dealType == SamplesCtx.replace) {
        Set<AdvancedParameter> withoutCommon = new HashSet<AdvancedParameter>(thisParam.size());
        for (AdvancedParameter p : thisParam) {
View Full Code Here

TOP

Related Classes of com.taobao.tddl.interact.rule.Samples.SamplesCtx

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.