INNER CODE UNIT · Python
equal_no_val_mode
beader/tianchi_nl2sql · code/nl2sql/utils/__init__.py:131
def equal_no_val_mode(self, other):
self_sql = SQL(cond_conn_op=self.cond_conn_op,
agg=self.agg,
sel=self.sel,
conds=[cond[:2] for cond in self.conds])
other_sql = SQL(cond_conn_op=other.cond_conn_op,
agg=other.agg,
sel=other.sel,
conds=[cond[:2] for cond in other.conds])
return self_sql.to_json() == other_sql.to_json()
def __eq__(self, other):
raise NotImplementedError('compare mode not set')
def __repr__(self):
repr_str = ''
repr_str += "sel: {}\n".format(self.sel)
repr_str += "agg: {}\n".format([self.agg_sql_dict[a]