Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect filter operator emitted by Filter Box #10421

Merged
merged 6 commits into from Jul 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion superset-frontend/package.json
Expand Up @@ -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",
Expand Down
Expand Up @@ -33,7 +33,7 @@ describe('getEffectiveExtraFilters', () => {
},
{
col: '__time_range',
op: '=',
op: '==',
val: ' : 2020-07-17T00:00:00',
},
]);
Expand Down
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion superset/charts/schemas.py
Expand Up @@ -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.",
)
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/query_context.py
Expand Up @@ -19,7 +19,7 @@

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,
Expand Down