def checkRule(self, op1, op2): print "check rule:******" print "op1:" op1.__print__() print "op2:" op2.__print__() print "pk1_list:" for pk in op1.pk_list: util.printExpList(pk) print "pk2_list:" for pk in op2.pk_list: util.printExpList(pk) if Rule.__pk_compare__(op1.pk_list, op2.pk_list) is False: return False print "pk_compare is true!!!!!!!!" print "self.ruletype:", self.rule_type if self.rule_type == 1: if isinstance(op1, op.SpjOp) and isinstance(op2, op.Op): print "use rule 1......" return True elif self.rule_type == 2: if isinstance(op1, op.SpjeOp) and isinstance(op2, op.Op): print "use rule 2......" return True elif self.rule_type == 3: if isinstance(op1, op.SpjOp) and op1.is_sp and isinstance(op2, op.Op): print "use rule 3......" return True elif self.rule_type == 4: if isinstance(op1, op.Op) and isinstance(op2, op.SpjOp) and op2.is_sp: print "use rule 4......" return True return False
def __print__(self): print "select_list:" print "exp_list: " util.printExpList(self.exp_list) print "exp_alias_dic: " util.printExpAliasDic(self.exp_alias_dic) return
def __print__(self): print "orderby_list: " util.printExpList(self.orderby_list)
def __print__(self): print "groupby_list: " util.printExpList(self.groupby_list)