You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "CodeWithPravinMaske (via GitHub)" <gi...@apache.org> on 2026/09/22 10:35:11 UTC

[PR] feat(filters): add date-only calendar range native filter [superset]

CodeWithPravinMaske opened a new pull request, #44527:
URL: https://github.com/apache/superset/pull/44527

   ### SUMMARY
   Adds a new native filter plugin, **Date range filter**, that renders a plain calendar date-range picker (AntD `RangePicker`, date-only — no time-of-day input) with no other range-type UI (no No filter / Advanced / Relative / Previous tabs). It's registered as its own filter type (`filter_date_range`) alongside the existing Time Range filter, so existing dashboards/filters are unaffected — teams that only need a bare calendar picker can add this filter type instead.
   
   It follows the same UI-only pattern as the existing Time filter (`filter_time`): no `buildQuery`, and on change it emits a standard `time_range` `extraFormData` value (`"YYYY-MM-DD : YYYY-MM-DD"`), so it is compatible with the backend's existing `time_range` `QueryObject` filter handling — no backend changes required.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before: no native filter type offers a date-only calendar picker — the only calendar-based option is the Time Range filter, which always shows a date+time input and a No filter/Advanced/Relative/Previous picker.
   
   After: a new "Date range filter" type is selectable in the native filter's "Filter Type" dropdown, rendering only a plain calendar range picker.
   
   ### TESTING INSTRUCTIONS
   1. `docker compose up` (or run the frontend dev server) and open any dashboard as an admin.
   2. Open "Add or edit filters and controls" > "+ New" > "Add filter".
   3. Set Filter Type to "Date range filter", give it a name, save.
   4. Confirm the filter bar renders a plain calendar date-range control (Start date / End date, no time-of-day fields) with no other range-type options.
   5. Pick a date range and apply — confirm dependent charts scoped to this filter re-query and their data changes accordingly (verified manually against the sample Sales Dashboard: selecting Jan 2024 filtered "Total Products Sold" from 99.1k to 2.04k).
   6. `npx jest src/filters/components/DateRange` — unit tests for the date-range parsing/formatting utilities pass.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration
   - [x] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5779700617

   Interesting idea, to add another filter instead of changing the existing one. I see this discussion about the need for this: https://github.com/apache/superset/discussions/19798 but don't immediately see any other PRs. Could you include screenshots of the new filter UI in your PR description? And how does this work with Jinja templating?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5778770012

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4071189798


##########
superset-frontend/src/filters/components/DateRange/transformProps.ts:
##########
@@ -0,0 +1,62 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { ChartProps } from '@superset-ui/core';
+import { noOp } from 'src/utils/common';
+import { DEFAULT_FORM_DATA } from './types';
+
+export default function transformProps(chartProps: ChartProps) {
+  const {
+    formData,
+    height,
+    hooks,
+    queriesData,
+    width,
+    behaviors,
+    filterState,
+    inputRef,
+  } = chartProps;
+  const {
+    setDataMask = noOp,
+    setHoveredFilter = noOp,
+    unsetHoveredFilter = noOp,
+    setFocusedFilter = noOp,
+    unsetFocusedFilter = noOp,
+    setFilterActive = noOp,
+  } = hooks;
+  const [{ data }] = queriesData;

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Unguarded queriesData destructure</b></div>
   <div id="fix">
   
   `const [{ data }] = queriesData;` throws `TypeError: Cannot destructure property 'data' of 'undefined'` when `queriesData` is empty — `ChartProps` defaults it to `[]` (ChartProps.ts:207). The sibling `Select/transformProps.ts:57-58` guards with `queryData || {}` and `data = []`. Mirror that guard to avoid a crash on render.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #2494c9</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/constants.ts:
##########
@@ -200,6 +200,7 @@ export enum FilterPlugins {
   Time = 'filter_time',
   TimeColumn = 'filter_timecolumn',
   TimeGrain = 'filter_timegrain',
+  DateRange = 'filter_date_range',

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Report drops new filter type</b></div>
   <div id="fix">
   
   Registering `filter_date_range` makes it selectable, but the report path never handles it: `AlertReportModal.tsx` serializes `filterType: 'filter_date_range'` (line 946-960), and backend `_generate_native_filter` (superset/reports/models.py:274-380) has no branch for it, so it hits the 'unrecognized filter type' warning and the filter is silently dropped from report output. Add a `filter_date_range` branch emitting `extraFormData.time_range`.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #2494c9</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/filters/components/DateRange/controlPanel.ts:
##########
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { ControlPanelConfig } from '@superset-ui/chart-controls';
+import { t } from '@apache-superset/core/translation';
+
+const config: ControlPanelConfig = {
+  controlPanelSections: [
+    {
+      label: t('UI Configuration'),
+      expanded: true,
+      controlSetRows: [
+        [
+          {
+            name: 'enableEmptyFilter',

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Dead control, no effect</b></div>
   <div id="fix">
   
   This new `enableEmptyFilter` checkbox has no consumer: `DateRangeFilterPlugin.tsx`, `transformProps.ts`, and `types.ts` never read it (0 matches), unlike `RangeFilterPlugin.validateRange` which enforces it. Users toggling 'Filter value is required' get no behavior change. Wire it into `handleChange` or drop the control.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #2494c9</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const [start, end] = value.split(RANGE_SEPARATOR);
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Missing-separator date misparsed</b></div>
   <div id="fix">
   
   `parseTimeRange('2024-01-01')` (no `RANGE_SEPARATOR`) yields `end === undefined`, and `dayjs(undefined)` returns the *current* date (valid), so a single-date value silently becomes `[now, now]` instead of `null`. Guard `!start || !end` before parsing. The backend `get_since_until` (date_parser.py:526) uses the same `" : "` separator, so a bare date is not a valid range.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #2494c9</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "CodeWithPravinMaske (via GitHub)" <gi...@apache.org>.
CodeWithPravinMaske commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5788048636

   Screenshots as requested:
   
   **Adding the new filter type** — "Date range filter" shows up in the Filter Type dropdown alongside the existing filter types (Value, Time range, Time column, Time grain, Numerical range):
   
   ![filter type dropdown](https://github.com/user-attachments/assets/placeholder-1)
   
   **The rendered filter bar control** — a plain calendar date-range picker, no time-of-day fields, no No filter/Advanced/Relative/Previous options — filtering a real dashboard (note the dependent chart's data has changed to the selected range):
   
   ![filter bar](https://github.com/user-attachments/assets/placeholder-2)
   
   @sfirke re: Jinja templating — it works exactly like the Time Range filter, no special-casing needed. The filter emits `extraFormData.time_range` as a `"YYYY-MM-DD : YYYY-MM-DD"` string, the same shape the Time Range filter produces. Superset's `get_time_filter()` Jinja macro (`superset/jinja_context.py`) reads directly off `form_data.get("time_range")` regardless of which filter type produced it, so `{{ get_time_filter(column).from_expr }}` / `.to_expr` and any dataset-level Jinja using `time_range` work identically whether the value came from Time Range or this new Date range filter.
   
   Thanks for flagging the discussion thread (#19798) — this PR takes the "additive new filter type" path discussed there rather than modifying the existing Time Range filter, specifically so it doesn't change behavior for anyone already using Time Range.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5809187496

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5992837372

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "pravinm-spry (via GitHub)" <gi...@apache.org>.
pravinm-spry commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5824649654

   @rusackas Took a look at SIP-116 (#26651) against this PR — here's the delta:
   
   | SIP-116 ask | This PR |
   |---|---|
   | "Alternative time filter... commonly used calendar date picker" (cites an Airbnb-style picker) | `Date range filter` — AntD `RangePicker`, a real calendar-range control |
   | "Fast navigation through months and years" | Built in — AntD's calendar header has month/year jump controls |
   | Replace the "scroll columns" design ("a nightmare on desktop") | No column-scroll UI at all, just the calendar |
   | "New dependencies... probably some UI lib" | None needed — AntD was already a dependency |
   | Rejected: slider-based picker | Not what we built |
   | Doesn't specify new filter type vs. replacing the existing one | Went additive — new `filter_date_range` type alongside Time Range, so existing dashboards/filters are untouched |
   
   So functionally this looks like a close match for the SIP's intent. The one gap: the SIP doesn't explicitly ask for removing time-of-day, but that fell out naturally from using a plain date picker rather than a datetime one — seems like a reasonable bonus simplification rather than a divergence.
   
   Happy to adjust anything if you see this differently before it goes to a vote.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5775171996

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "CodeWithPravinMaske (via GitHub)" <gi...@apache.org>.
CodeWithPravinMaske commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5824671566

   @rusackas Took a look at SIP-116 (#26651) against this PR — here's the delta:
   
   | SIP-116 ask | This PR |
   |---|---|
   | "Alternative time filter... commonly used calendar date picker" (cites an Airbnb-style picker) | `Date range filter` — AntD `RangePicker`, a real calendar-range control |
   | "Fast navigation through months and years" | Built in — AntD's calendar header has month/year jump controls |
   | Replace the "scroll columns" design ("a nightmare on desktop") | No column-scroll UI at all, just the calendar |
   | "New dependencies... probably some UI lib" | None needed — AntD was already a dependency |
   | Rejected: slider-based picker | Not what we built |
   | Doesn't specify new filter type vs. replacing the existing one | Went additive — new `filter_date_range` type alongside Time Range, so existing dashboards/filters are untouched |
   
   So functionally this looks like a close match for the SIP's intent. The one gap: the SIP doesn't explicitly ask for removing time-of-day, but that fell out naturally from using a plain date picker rather than a datetime one — seems like a reasonable bonus simplification rather than a divergence.
   
   Happy to adjust anything if you see this differently before it goes to a vote.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5780934061

   @CodeWithPravinMaske since this is a new feature, can we add screenshots to the PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5776715427

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44527?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `0%` with `1 line` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 57.16%. Comparing base ([`4df9c0a`](https://app.codecov.io/gh/apache/superset/commit/4df9c0ad362b7ffb151bb93197d0a9071d7ccf1a?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`755213e`](https://app.codecov.io/gh/apache/superset/commit/755213e93a8d2121a20a82a4e68dddf305eec7e2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 2 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/44527?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [superset/reports/models.py](https://app.codecov.io/gh/apache/superset/pull/44527?src=pr&el=tree&filepath=superset%2Freports%2Fmodels.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvcmVwb3J0cy9tb2RlbHMucHk=) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/44527?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (4df9c0a) and HEAD (755213e). Click for more details.
   > 
   > <details><summary>HEAD has 31 uploads less than BASE</summary>
   >
   >| Flag | BASE (4df9c0a) | HEAD (755213e) |
   >|------|------|------|
   >|python|25|2|
   >|presto|5|1|
   >|hive|5|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #44527      +/-   ##
   ==========================================
   - Coverage   66.15%   57.16%   -9.00%     
   ==========================================
     Files        2945     2945              
     Lines      176984   176982       -2     
     Branches    41046    41044       -2     
   ==========================================
   - Hits       117083   101169   -15914     
   - Misses      57406    74838   +17432     
   + Partials     2495      975    -1520     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/44527/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [hive](https://app.codecov.io/gh/apache/superset/pull/44527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.94% <0.00%> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/44527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [postgres](https://app.codecov.io/gh/apache/superset/pull/44527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [presto](https://app.codecov.io/gh/apache/superset/pull/44527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.88% <0.00%> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/44527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.93% <0.00%> (-17.60%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/44527/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/44527?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4073232077


##########
superset/reports/models.py:
##########
@@ -259,6 +259,7 @@ def _generate_native_filter(
         # Filter types that require at least one value
         requires_values = (
             "filter_time",
+            "filter_date_range",

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Null time_range on cleared filter</b></div>
   <div id="fix">
   
   `requires_values` guard checks `not values`, but a cleared RangePicker yields `filterValues: [null]` (truthy), so `values[0]` (None) lands in `extraFormData.time_range`/`filterState.value`. The frontend `validNativeFilters` keeps `[null]` (length 1). Consider also skipping when `values[0]` is None for `filter_time`/`filter_date_range`.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c6366a</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -1699,6 +1706,28 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
         />
       );
     }
+    if (filterType === 'filter_date_range') {
+      return (
+        <RangePicker
+          value={parseTimeRange(filterValues?.[0])}

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Magic format string</b></div>
   <div id="fix">
   
   The literal `YYYY-MM-DD` duplicates the exported `DATE_FORMAT` constant in the same module already imported for `parseTimeRange`/`formatTimeRange`. Using the constant keeps the picker format and the stored range format in sync if the format ever changes.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c6366a</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/filters/components/DateRange/controlPanel.ts:
##########
@@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { ControlPanelConfig } from '@superset-ui/chart-controls';
+import { t } from '@apache-superset/core/translation';
+
+const config: ControlPanelConfig = {
+  controlPanelSections: [
+    {
+      label: t('UI Configuration'),
+      expanded: true,
+      controlSetRows: [
+        [
+          {
+            name: 'enableEmptyFilter',
+            config: {
+              type: 'CheckboxControl',
+              label: () => t('Filter value is required'),
+              default: false,
+              renderTrigger: true,
+              description: () =>
+                t('User must select a value before applying the filter'),
+            },

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Duplicated control block</b></div>
   <div id="fix">
   
   The `enableEmptyFilter` control block (lines 30-38) is copied verbatim from `Range/controlPanel.ts`, `Time/controlPanel.ts`, `TimeColumn`, `TimeGrain` and `Select` control panels. This duplicated UI-config logic will drift (e.g. label/description wording). Consider extracting a shared control definition.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c6366a</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/filters/components/DateRange/DateRangeFilterPlugin.tsx:
##########
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { useCallback, useMemo } from 'react';
+import { styled } from '@apache-superset/core/theme';
+import { RangePicker } from '@superset-ui/core/components';
+import { PluginFilterDateRangeProps } from './types';
+import { DATE_FORMAT, formatTimeRange, parseTimeRange } from './utils';
+import { FilterPluginStyle } from '../common';
+
+const ControlContainer = styled.div`
+  width: 100%;
+`;
+
+export default function DateRangeFilterPlugin(
+  props: PluginFilterDateRangeProps,
+) {
+  const {
+    setDataMask,
+    setHoveredFilter,
+    unsetHoveredFilter,
+    setFocusedFilter,
+    unsetFocusedFilter,
+    setFilterActive,
+    width,
+    height,
+    filterState,
+    inputRef,
+  } = props;
+
+  const value = useMemo(
+    () => parseTimeRange(filterState.value),
+    [filterState.value],
+  );
+
+  const handleChange = useCallback(
+    (dates: ReturnType<typeof parseTimeRange>) => {
+      const timeRange = formatTimeRange(dates);
+      setDataMask({
+        extraFormData: timeRange ? { time_range: timeRange } : {},
+        filterState: { value: timeRange },
+      });
+    },
+    [setDataMask],
+  );

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Unused filter option</b></div>
   <div id="fix">
   
   `controlPanel.ts` exposes an `enableEmptyFilter` option ("Filter value is required"), but this plugin never reads `props.formData.enableEmptyFilter`. With `allowClear`, clearing the picker always emits `filterState: { value: undefined }` and `extraFormData: {}`, so the option has no effect. Honor the flag like `RangeFilterPlugin`/`SelectFilterPlugin` do.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c6366a</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -1699,6 +1706,28 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
         />
       );
     }
+    if (filterType === 'filter_date_range') {
+      return (
+        <RangePicker
+          value={parseTimeRange(filterValues?.[0])}
+          format="YYYY-MM-DD"
+          allowClear
+          onChange={dates => {
+            const timeRange = formatTimeRange(dates);
+            setNativeFilterData(
+              nativeFilterData.map((f: any) =>
+                filter.nativeFilterId === f.nativeFilterId
+                  ? {
+                      ...f,
+                      filterValues: [timeRange],
+                    }

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Cleared range persists null</b></div>
   <div id="fix">
   
   With `allowClear`, clearing the picker makes `dates` null, so `formatTimeRange` returns `undefined` and `filterValues: [timeRange]` stores `[undefined]`. Because `[undefined].length === 1`, the save check `hasFilterValues` (line 946) and validation (line 1831) both treat it as populated, persisting `[null]` for a cleared filter. Store `[]` when `timeRange` is undefined.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c6366a</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



##########
superset-frontend/src/filters/components/DateRange/types.ts:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import { RefObject } from 'react';
+import {
+  Behavior,
+  DataRecord,
+  FilterState,
+  QueryFormData,
+} from '@superset-ui/core';
+import { PluginFilterHooks, PluginFilterStylesProps } from '../types';
+
+interface PluginFilterDateRangeCustomizeProps {
+  defaultValue?: string | null;

Review Comment:
   <div>
   
   
   <div id="suggestion">
   <div id="issue"><b>Dead contract field</b></div>
   <div id="fix">
   
   `defaultValue` is declared in `PluginFilterDateRangeCustomizeProps` and `DEFAULT_FORM_DATA`, but `DateRangeFilterPlugin` only reads `filterState.value` and `controlPanel.ts` exposes no `defaultValue` control. A configured default value is silently ignored. Either wire it up (use as initial value when `filterState.value` is empty, like `RangeFilterPlugin`) or drop the field from the contract.
   </div>
   
   
   </div>
   
   
   
   
   <small><i>Code Review Run #c6366a</i></small>
   </div>
   
   ---
   Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
   - [ ] Yes, avoid them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4079564432


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `b547203`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4091738590


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `afd4ab9`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4089621559


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `975dd5b`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "CodeWithPravinMaske (via GitHub)" <gi...@apache.org>.
CodeWithPravinMaske commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4123525514


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+// Superset's time_range filter treats the upper bound as exclusive
+// (`col < end_dttm`, see superset/models/helpers.py get_time_filter), so the
+// stored end date is the day AFTER the one the user picked — otherwise the
+// entire selected end day would be excluded from query results. Displaying
+// it back to the user reverses that offset so round-tripping stays exact.
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate.subtract(1, 'day')];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  const exclusiveEnd = end.add(1, 'day');
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${exclusiveEnd.format(DATE_FORMAT)}`;

Review Comment:
   @andy-clapson Good catch, and correct — this is absolute-dates-only by design, not a bug. The picker only ever produces literal calendar dates (YYYY-MM-DD : YYYY-MM-DD), never a relative expression, so a "last 30 days" selection freezes to those specific dates and won't roll forward. That's intentional: the whole point of this filter is to be the plain-calendar counterpart to the existing Time Range filter, which already covers relative/rolling windows via its Advanced tab. Anyone who needs a rolling "last N days" filter should use Time Range instead — this one's additive, not a replacement, so that option isn't going away. Happy to call this out explicitly in the docs/PR description if it'd help avoid confusion for future users.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "krmmkr (via GitHub)" <gi...@apache.org>.
krmmkr commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4129257804


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+// Superset's time_range filter treats the upper bound as exclusive
+// (`col < end_dttm`, see superset/models/helpers.py get_time_filter), so the
+// stored end date is the day AFTER the one the user picked — otherwise the
+// entire selected end day would be excluded from query results. Displaying
+// it back to the user reverses that offset so round-tripping stays exact.
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate.subtract(1, 'day')];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  const exclusiveEnd = end.add(1, 'day');
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${exclusiveEnd.format(DATE_FORMAT)}`;

Review Comment:
   Can we not have both advanced options and calendar picker in a single filter? The reason is if we need to provide advanced flexibility to end users, wouldn't it be easier to have a single filter than choosing between 2?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4351134451


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+// Superset's time_range filter treats the upper bound as exclusive
+// (`col < end_dttm`, see superset/models/helpers.py get_time_filter), so the
+// stored end date is the day AFTER the one the user picked — otherwise the
+// entire selected end day would be excluded from query results. Displaying
+// it back to the user reverses that offset so round-tripping stays exact.
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate.subtract(1, 'day')];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  const exclusiveEnd = end.add(1, 'day');
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${exclusiveEnd.format(DATE_FORMAT)}`;

Review Comment:
   Hey @krmmkr I agree, and I just posted a new comment on SIP-116 suggesting we move toward that in the course of two PRs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "andy-clapson (via GitHub)" <gi...@apache.org>.
andy-clapson commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4123212805


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+// Superset's time_range filter treats the upper bound as exclusive
+// (`col < end_dttm`, see superset/models/helpers.py get_time_filter), so the
+// stored end date is the day AFTER the one the user picked — otherwise the
+// entire selected end day would be excluded from query results. Displaying
+// it back to the user reverses that offset so round-tripping stays exact.
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate.subtract(1, 'day')];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  const exclusiveEnd = end.add(1, 'day');
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${exclusiveEnd.format(DATE_FORMAT)}`;

Review Comment:
   this will stick to absolute dates only, won't it? i.e. if I leave a filter to "last 30", wont it freeze to those last 30 days forever?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4089662410


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `654ab2c`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5792035318

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add a Calendar date picker option to the Time range filter [superset]

Posted by "CodeWithPravinMaske (via GitHub) via notifications" <no...@superset.apache.org>.
CodeWithPravinMaske commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-6908664403

   Following up on Evan's points about this PR in the SIP discussion: https://github.com/apache/superset/issues/45901#issuecomment-6873347411. I'll push the fixes here and keep the PR on hold until the vote.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "CodeWithPravinMaske (via GitHub)" <gi...@apache.org>.
CodeWithPravinMaske commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4130013465


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+// Superset's time_range filter treats the upper bound as exclusive
+// (`col < end_dttm`, see superset/models/helpers.py get_time_filter), so the
+// stored end date is the day AFTER the one the user picked — otherwise the
+// entire selected end day would be excluded from query results. Displaying
+// it back to the user reverses that offset so round-tripping stays exact.
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate.subtract(1, 'day')];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  const exclusiveEnd = end.add(1, 'day');
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${exclusiveEnd.format(DATE_FORMAT)}`;

Review Comment:
   @krmmkr Fair question, and it was a real design fork.
   
   **Why this filter exists at all**: the existing Time Range filter's multi-tab UI (No filter / Advanced / Relative / Previous / Custom with time) is flexible but overwhelming for the common case of "just pick a start and end date" — that's the whole motivation behind SIP-116 (#26651), which this PR is aiming to satisfy. So this filter is intentionally the plain-calendar counterpart: pick a date, pick a date, done.
   
   **Why no advanced options here**: that functionality already exists in the Time Range filter — relative ranges, "No filter," previous-period comparison, advanced expressions, all of it. Duplicating that inside this filter wouldn't add any new capability, it'd just be two filters doing the same thing with more surface area to maintain, and it'd reintroduce the exact complexity/discoverability problem the SIP was trying to get away from. If a dashboard needs both simple and advanced audiences, the two filter types can sit side by side rather than merging into one.
   
   We're not planning to change that in this PR. If there's real appetite for it later, that's a reasonable follow-up enhancement to scope separately (possibly via the SIP-116 thread) rather than something to fold in now.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "CodeWithPravinMaske (via GitHub)" <gi...@apache.org>.
CodeWithPravinMaske commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5776031840

   Thanks for the review, @bito-code-review. Pushed a follow-up commit addressing feedback:
   
   - **Fixed** — `parseTimeRange` now rejects a value missing the `" : "` separator instead of silently defaulting the missing end date to "now" (`dayjs(undefined)` is valid). Added a regression test.
   - **Fixed** — added `filter_date_range` alongside `filter_time` in the Alerts & Reports scheduled-report filter serializer (`superset/reports/models.py`) and in `AlertReportModal.tsx`, so scheduled reports handle this filter the same way they already do Time Range.
   - **Not applicable** — the "unguarded queriesData destructure" and "dead enableEmptyFilter control" items match the existing `filter_time` plugin's pattern exactly (queriesData is always populated for UI-only filters with no `buildQuery`; `enableEmptyFilter` is consumed by the FilterControl wrapper, not the plugin component). Left as-is for consistency with that precedent.
   - **Out of scope** — the rison/URL deep-linking gap in `risonFilters.ts` (`convertRisonToNativeValue`) is a pre-existing issue that also affects `filter_time` today (its case there uses the wrong string, `filter_time_range` instead of `filter_time`, so it's dead code already). Fixing it properly means touching shared rison-injection logic used by every filter type — happy to file that separately rather than scope-creep this PR.
   - **Left as-is** — the unused `defaultValue` field mirrors the identical dead field already present in `Time/types.ts`; keeping it for consistency with that plugin's structure rather than diverging.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4087055936


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const [start, end] = value.split(RANGE_SEPARATOR);
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;

Review Comment:
   Fixed — `parseTimeRange` now checks `parts.length !== 2` and returns `null` before ever reaching `dayjs(undefined)`, so a bare date without the separator can't silently become `[now, now]`.



##########
superset-frontend/src/constants.ts:
##########
@@ -200,6 +200,7 @@ export enum FilterPlugins {
   Time = 'filter_time',
   TimeColumn = 'filter_timecolumn',
   TimeGrain = 'filter_timegrain',
+  DateRange = 'filter_date_range',

Review Comment:
   Fixed — `superset/reports/models.py`'s `_generate_native_filter` now has a `filter_date_range` branch alongside `filter_time`, with test coverage in `model_test.py`.



##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -1699,6 +1706,28 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
         />
       );
     }
+    if (filterType === 'filter_date_range') {
+      return (
+        <RangePicker
+          value={parseTimeRange(filterValues?.[0])}

Review Comment:
   Fixed — the picker in `AlertReportModal.tsx` now uses the imported `DATE_FORMAT` constant instead of a literal `'YYYY-MM-DD'`.



##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -1699,6 +1706,28 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
         />
       );
     }
+    if (filterType === 'filter_date_range') {
+      return (
+        <RangePicker
+          value={parseTimeRange(filterValues?.[0])}
+          format="YYYY-MM-DD"
+          allowClear
+          onChange={dates => {
+            const timeRange = formatTimeRange(dates);
+            setNativeFilterData(
+              nativeFilterData.map((f: any) =>
+                filter.nativeFilterId === f.nativeFilterId
+                  ? {
+                      ...f,
+                      filterValues: [timeRange],
+                    }

Review Comment:
   Fixed — `onChange` now stores `filterValues: timeRange ? [timeRange] : []`, so clearing the picker persists an empty array instead of `[undefined]`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4303039374


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `878271e`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-6235122744

   ## CodeAnt PR Risk: Low Risk
   
   - The PR appears safe to merge; the date-range filter is registered and its exclusive end-date handling is consistent with Superset's time-range bounds.
   - Added tests cover inclusive end dates, single-day selections, round-tripping, and empty or invalid values.
   
   **Assessed commit:** `878271eb549a`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4079530382


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   **Suggestion:** The selected end date is serialized at midnight, but Superset treats the upper time-range bound as exclusive, excluding the entire selected final calendar day.
   
   **Assessment:** 🟠 `Major` · 🔁 `Occurrence: Often` · 🏷️ `Logic error`
   
   [![Use CodeAnt Skill](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/use-codeant-skill-flat-v2.svg)](https://docs.codeant.ai/cli/resolve-pr-comments-skill) [![Fix in Cursor](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-cursor-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=128e1d62a2a8494282e0955c3d33e3bd&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [![Fix in VSCode Claude](https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/fix-in-vscode-claude-flat.svg)](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=128e1d62a2a8494282e0955c3d33e3bd&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
   <details>
   <summary><b>Prompt for AI Agent 🤖 </b></summary>
   
   ```mdx
   This is a comment left during a code review.
   
   **Path:** superset-frontend/src/filters/components/DateRange/utils.ts
   **Line:** 40:40
   **Comment:**
   	*Logic Error: The selected end date is serialized at midnight, but Superset treats the upper time-range bound as exclusive, excluding the entire selected final calendar day.
   
   Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
   Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
   ```
   </details>
   <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44527&comment_hash=9d1e96a2a456af1baacc398e28a8cfc364221c9a7e24cb513187f5963289e21e&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F44527&comment_hash=9d1e96a2a456af1baacc398e28a8cfc364221c9a7e24cb513187f5963289e21e&reaction=dislike'>👎</a>



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5816518892

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "CodeWithPravinMaske (via GitHub)" <gi...@apache.org>.
CodeWithPravinMaske commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5990047557

   @andy-clapson @krmmkr thanks for the feedback. I replied on your threads (absolute dates only by design; a relative/advanced mode could come later as an opt-in toggle). Does that answer your questions, or would you want something changed in this PR before it goes ahead? If you're fine with it, please resolve your threads.
   
   @rusackas the branch is rebased on the latest master, the only open item is the `hold:sip!` label. Is there anything else you need from me on SIP-116 alignment?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4133859637


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `e06eaeb`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4279864279


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `b12786c`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5775016926

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | e845571ed4c882317e27d930351c7fb3a1bc1e0b |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6ab259df2da0ac00076267cf |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-44527--superset-docs-preview.netlify.app](https://deploy-preview-44527--superset-docs-preview.netlify.app) |
   |<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br />![QR Code](https://app.netlify.com/qr-code/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQ0NTI3LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.BHcf71g5r7XdPBUftjXF1tIXSn5XHiM2MZaq-dUrZlk)<br /><br />_Use your smartphone camera to open QR code link._</details> |
   |<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpBCoAgEEDRu8w6SYSUukHHGJ2xBFORIYjo7rn7fN4LrderCWwAE_iOJZyjI6PMhMJqnINVQUk3q5iycB-QuOX67DSoRW-WlaIh1Bi01s4a60KE7wc) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-44527--superset-docs-preview.netlify.app) -->
   _To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5894134279

   AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
   
   <details>
   <summary>
   Bito Usage Guide
   </summary>
   
   **Commands**
         
   Type the following command in the pull request comment and save the comment.
         
   - `/review` - Manually triggers an incremental AI Review.
   - `/review full` - Manually triggers a full AI Review.
   
   - `/pause` - Pauses automatic reviews on this pull request.
   - `/resume` - Resumes automatic reviews.
   - `/resolve` - Marks all Bito-posted review comments as resolved.
   - `/abort` - Cancels all in-progress reviews.
   
         
   Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
         
   **Configuration**
   
   This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
         
   **Documentation & Help**
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
   - <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
   
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4227278544


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `fc37b3e`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4087057540


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const [start, end] = value.split(RANGE_SEPARATOR);
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;

Review Comment:
   <!-- Bito Reply -->
   The suggestion is appropriate and improves the code by preventing a potential bug where a single date without a separator could be incorrectly parsed as a range. By checking the number of parts before parsing, the function correctly returns `null` for invalid input formats, ensuring more robust date range handling.
   
   **superset-frontend/src/filters/components/DateRange/utils.ts**
   ```
   const [start, end] = value.split(RANGE_SEPARATOR);
     if (!start || !end) return null;
     const startDate = dayjs(start);
     const endDate = dayjs(end);
   ```



##########
superset-frontend/src/constants.ts:
##########
@@ -200,6 +200,7 @@ export enum FilterPlugins {
   Time = 'filter_time',
   TimeColumn = 'filter_timecolumn',
   TimeGrain = 'filter_timegrain',
+  DateRange = 'filter_date_range',

Review Comment:
   <!-- Bito Reply -->
   The suggestion provided by the reviewer is appropriate and addresses a functional gap where the new filter type was selectable in the UI but not handled in the report generation logic. Applying this change ensures that the report correctly processes the filter and emits the expected data, preventing it from being dropped.
   
   **superset-frontend/src/constants.ts**
   ```
   Time = 'filter_time',
     TimeColumn = 'filter_timecolumn',
     TimeGrain = 'filter_timegrain',
   +  DateRange = 'filter_date_range',
   ```



##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -1699,6 +1706,28 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
         />
       );
     }
+    if (filterType === 'filter_date_range') {
+      return (
+        <RangePicker
+          value={parseTimeRange(filterValues?.[0])}

Review Comment:
   <!-- Bito Reply -->
   The suggestion to use the `DATE_FORMAT` constant instead of the hardcoded `'YYYY-MM-DD'` string is appropriate. It improves maintainability by ensuring the picker format remains consistent with the format used by `parseTimeRange` and `formatTimeRange` throughout the module.
   
   **superset-frontend/src/features/alerts/AlertReportModal.tsx**
   ```
   <RangePicker
             value={parseTimeRange(filterValues?.[0])}
             format={DATE_FORMAT}
   ```



##########
superset-frontend/src/features/alerts/AlertReportModal.tsx:
##########
@@ -1699,6 +1706,28 @@ const AlertReportModal: FunctionComponent<AlertReportModalProps> = ({
         />
       );
     }
+    if (filterType === 'filter_date_range') {
+      return (
+        <RangePicker
+          value={parseTimeRange(filterValues?.[0])}
+          format="YYYY-MM-DD"
+          allowClear
+          onChange={dates => {
+            const timeRange = formatTimeRange(dates);
+            setNativeFilterData(
+              nativeFilterData.map((f: any) =>
+                filter.nativeFilterId === f.nativeFilterId
+                  ? {
+                      ...f,
+                      filterValues: [timeRange],
+                    }

Review Comment:
   <!-- Bito Reply -->
   The suggestion is correct and improves the code. By storing an empty array `[]` instead of `[undefined]` when the time range is cleared, the application correctly handles the filter state, preventing the save and validation logic from incorrectly treating the cleared filter as populated.
   
   **superset-frontend/src/features/alerts/AlertReportModal.tsx**
   ```
   onChange={dates => {
               const timeRange = formatTimeRange(dates);
               setNativeFilterData(
                 nativeFilterData.map((f: any) =>
                   filter.nativeFilterId === f.nativeFilterId
                     ? {
                         ...f,
                         filterValues: timeRange ? [timeRange] : [],
                       }
                     : f,
                 ),
               );
             }}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #44527:
URL: https://github.com/apache/superset/pull/44527#issuecomment-5818461149

   I think this is REALLY close to appeasing https://github.com/apache/superset/issues/26651
   
   It'd be good to see what the delta is between that SIP and this implementation. We can move that SIP to a vote once we see if I'm right about their potential alignment. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4181672074


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,41 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${end.format(DATE_FORMAT)}`;

Review Comment:
   ✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `64a75a1`.
   
   The formatter now adds one day to the selected end date before serializing it as the exclusive upper bound, and the parser subtracts one day when displaying it back.
   
   <sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
   
   <!-- codeant-auto-resolve-reply -->



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] feat(filters): add date-only calendar range native filter [superset]

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on code in PR #44527:
URL: https://github.com/apache/superset/pull/44527#discussion_r4351140781


##########
superset-frontend/src/filters/components/DateRange/utils.ts:
##########
@@ -0,0 +1,47 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import dayjs, { Dayjs } from 'dayjs';
+
+export const DATE_FORMAT = 'YYYY-MM-DD';
+export const RANGE_SEPARATOR = ' : ';
+
+export type DateRangeValue = [Dayjs | null, Dayjs | null] | null;
+
+// Superset's time_range filter treats the upper bound as exclusive
+// (`col < end_dttm`, see superset/models/helpers.py get_time_filter), so the
+// stored end date is the day AFTER the one the user picked — otherwise the
+// entire selected end day would be excluded from query results. Displaying
+// it back to the user reverses that offset so round-tripping stays exact.
+export function parseTimeRange(value?: string | null): DateRangeValue {
+  if (!value) return null;
+  const parts = value.split(RANGE_SEPARATOR);
+  if (parts.length !== 2) return null;
+  const [start, end] = parts;
+  const startDate = dayjs(start);
+  const endDate = dayjs(end);
+  if (!startDate.isValid() || !endDate.isValid()) return null;
+  return [startDate, endDate.subtract(1, 'day')];
+}
+
+export function formatTimeRange(dates: DateRangeValue): string | undefined {
+  const [start, end] = dates ?? [null, null];
+  if (!start || !end) return undefined;
+  const exclusiveEnd = end.add(1, 'day');
+  return `${start.format(DATE_FORMAT)}${RANGE_SEPARATOR}${exclusiveEnd.format(DATE_FORMAT)}`;

Review Comment:
   This would also address what @andy-clapson writes above.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org