INNER CODE UNIT · Python
equal_all_mode
beader/tianchi_nl2sql · code/nl2sql/utils/__init__.py:112
def equal_all_mode(self, other):
return self.to_json() == other.to_json()
def equal_agg_mode(self, other):
self_sql = SQL(cond_conn_op=0, agg=self.agg, sel=self.sel, conds=[])
other_sql = SQL(cond_conn_op=0, agg=other.agg, sel=other.sel, conds=[])
return self_sql.to_json() == other_sql.to_json()
def equal_conn_and_agg_mode(self, other):
self_sql = SQL(cond_conn_op=self.cond_conn_op,
agg=self.agg,
sel=self.sel,
conds=[])
other_sql = SQL(cond_conn_op=other.cond_conn_op,
agg=other.agg,
sel=other.sel,
conds=[])
return self_sql.to_json() == other_sql.to_json()