param = (data.table_name, attribute.name, filters if filters else None, self.n)
cur = data._execute_sql_query(sql, param)
points = [a for a, in cur.fetchall()]
else:
d = Orange.statistics.distribution.get_distribution(data, attribute)
points = _split_eq_width(d, n=self.n)
After Change
if type(data) == Orange.data.sql.table.SqlTable:
filters = [f.to_sql() for f in data.row_filters]
filters = [f for f in filters if f]
att = attribute.to_sql()
cur = data._sql_query(["min(%s)" % att, "max(%s)" % att], filters)
min, max = cur.fetchone()
dif = (max - min) / self.n
points = [min + (i + 1) * dif for i in range(self.n - 1)]
else:
// TODO: why is the whole distribution computed instead of just min/max