defaultSegmentFilters = state => {
  const {
    data: {fields},
    baseCols,
  } = state;
  assert(
    fields.length && baseCols.length,
    '`data.field` and `baseCols` must be non-empty'
  );
  const baseColFields = baseCols.map(colId => fields[colId]);
  const filtersByField = baseColFields.map(field =>
    defaultSegmentFiltersFromFieldDef(field)
  );
  // todo: this is not the most efficient way to do filtering (should organize filters by fields). Keeping the structure to for backward compatibility
  return product(filtersByField);
}
@return {Array<Array<Object>} length corresponds to number of segments, each element is an array of filters each segment must fulfill