fix: incorrect filter operator emitted by Filter Box (#10421)
* fix: equals operator in filter box * fix time range endpoint schema * fix test * bump packages * fix tests * lint
This commit is contained in:
parent
ea3c3bbae4
commit
5b6ff4944c
|
|
@ -8694,9 +8694,9 @@
|
|||
}
|
||||
},
|
||||
"@superset-ui/query": {
|
||||
"version": "0.14.12",
|
||||
"resolved": "https://registry.npmjs.org/@superset-ui/query/-/query-0.14.12.tgz",
|
||||
"integrity": "sha512-mCs9qg7z4GWlMuImrAfqEdVcwPFaSZ2EwbC8H4rdiiRy3duhJGO81Wnvk8J4S1+8L1PwXx+nLVPDjh/Mg7u65g=="
|
||||
"version": "0.14.15",
|
||||
"resolved": "https://registry.npmjs.org/@superset-ui/query/-/query-0.14.15.tgz",
|
||||
"integrity": "sha512-k89EuCkXp3LmbBSm8yYpmykeoJNy1HvMj3jNRwYS0kvV7nNd267oAdXl8UnFzl+htxqwLUIidcXN9vzydB4Whw=="
|
||||
},
|
||||
"@superset-ui/style": {
|
||||
"version": "0.14.9",
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
"@superset-ui/plugin-chart-table": "^0.14.11",
|
||||
"@superset-ui/plugin-chart-word-cloud": "^0.14.9",
|
||||
"@superset-ui/preset-chart-xy": "^0.14.9",
|
||||
"@superset-ui/query": "^0.14.12",
|
||||
"@superset-ui/query": "^0.14.15",
|
||||
"@superset-ui/style": "^0.14.9",
|
||||
"@superset-ui/superset-ui": "^0.14.9",
|
||||
"@superset-ui/time-format": "^0.14.9",
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ describe('getEffectiveExtraFilters', () => {
|
|||
},
|
||||
{
|
||||
col: '__time_range',
|
||||
op: '=',
|
||||
op: '==',
|
||||
val: ' : 2020-07-17T00:00:00',
|
||||
},
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ export default function getEffectiveExtraFilters(filters: DataRecordFilters) {
|
|||
return Object.entries(filters)
|
||||
.map(([column, values]) => ({
|
||||
col: column,
|
||||
op: Array.isArray(values) ? 'in' : '=',
|
||||
op: Array.isArray(values) ? 'in' : '==',
|
||||
val: values,
|
||||
}))
|
||||
.filter(filter => filter.val !== null);
|
||||
|
|
|
|||
|
|
@ -659,7 +659,7 @@ class ChartDataExtrasSchema(Schema):
|
|||
|
||||
time_range_endpoints = fields.List(
|
||||
fields.String(
|
||||
validate=validate.OneOf(choices=("INCLUSIVE", "EXCLUSIVE")),
|
||||
validate=validate.OneOf(choices=("unknown", "inclusive", "exclusive")),
|
||||
description="A list with two values, stating if start/end should be "
|
||||
"inclusive/exclusive.",
|
||||
)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from typing import Any, Dict, List
|
|||
|
||||
QUERY_OBJECTS = {
|
||||
"birth_names": {
|
||||
"extras": {"where": "", "time_range_endpoints": ["INCLUSIVE", "EXCLUSIVE"],},
|
||||
"extras": {"where": "", "time_range_endpoints": ["inclusive", "exclusive"]},
|
||||
"granularity": "ds",
|
||||
"groupby": ["name"],
|
||||
"is_timeseries": False,
|
||||
|
|
|
|||
Loading…
Reference in New Issue