Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
add apply_fetch_values_predicate to QueryObject
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Mar 8, 2021
1 parent 8239476 commit cfe6de8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/superset-ui-core/src/query/buildQueryObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ export default function buildQueryObject<T extends QueryFormData>(
filters: QueryObjectFilterClause[];
adhoc_filters: AdhocFilter[];
} = {
filters: [...(formData.filters || []), ...(append_form_data.filters || [])],
filters: [...(extras.filters || []), ...(append_form_data.filters || [])],
adhoc_filters: [...(formData.adhoc_filters || []), ...(append_form_data.adhoc_filters || [])],
};
const extrasAndfilters = processFilters({
...formData,
...filterFormData,
...extras,
...filterFormData,
});

let queryObject: QueryObject = {
Expand All @@ -80,5 +80,6 @@ export default function buildQueryObject<T extends QueryFormData>(
};
// override extra form data used by native and cross filters
queryObject = overrideExtraFormData(queryObject, override_form_data);

return { ...queryObject, custom_form_data };
}
3 changes: 3 additions & 0 deletions packages/superset-ui-core/src/query/types/Query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ export interface QueryObject extends QueryFields, TimeRange, ResidualQueryObject
/** Time filters that have been applied to the query object */
applied_time_extras?: AppliedTimeExtras;

/** add fetch value predicate to query if defined in datasource */
apply_fetch_values_predicate?: boolean;

/**
* Extra form data. Current stores information about time granularity, may be
* cleaned up in the future.
Expand Down

0 comments on commit cfe6de8

Please sign in to comment.