You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sadpandajoe (via GitHub)" <gi...@apache.org> on 2026/08/20 05:17:38 UTC

[PR] fix(gsheets): correctly format Date-column filter literals [superset]

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

   ### SUMMARY
   Filtering a Date-typed column on a Google Sheets-backed dataset (for example, a built-in "Previous Calendar Month" time range) raised `Invalid query: NO_COLUMN: null`. `GSheetsEngineSpec` inherited `SqliteEngineSpec.convert_dttm`, which only handles `String`/`DateTime` SQLAlchemy types and returns `None` for `Date`. Superset then fell back to a full `'YYYY-MM-DD HH:MM:SS.ffffff'` literal for the filter bound, even for a pure Date column. Shillelagh's `ISODate` parser (used internally by the GSheets adapter to turn the SQL literal into a filter value) rejects the trailing time-of-day and silently returns `None`, which the adapter then renders as the bare, unquoted literal `null` in the generated query. Google's API parses that bareword as a column reference rather than a NULL value, producing exactly the reported error.
   
   This adds a `GSheetsEngineSpec.convert_dttm` override that emits a plain `'YYYY-MM-DD'` literal for Date columns (no `TO_DATE()`-style wrapper needed, since shillelagh's query layer is SQLite/apsw, not Postgres), matching the format the adapter actually parses. DateTime columns are unaffected — they already go through the inherited, working code path.
   
   See `RCA.md` on this branch for the full root-cause trace, including a standalone reproduction script run against the installed `shillelagh` package before and after the fix.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A — backend query-generation fix, no UI change.
   
   ### TESTING INSTRUCTIONS
   - `pytest tests/unit_tests/db_engine_specs/test_gsheets.py -k test_convert_dttm` — new parametrized test covering Date, DateTime, and an unrecognized type. The Date case fails on `master` (`AssertionError: None`) and passes with this change.
   - Full `tests/unit_tests/db_engine_specs/` and `tests/unit_tests/models/helpers_test.py` suites pass with no new failures.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue: related to #30413 (same `NO_COLUMN: null` error reported for Google Sheets dashboard filters generally; this fixes the mechanism for Date-typed columns specifically)
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration
   - [ ] 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] fix(gsheets): correctly format Date-column filter literals [superset]

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

   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 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] fix(gsheets): correctly format Date-column filter literals [superset]

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

   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] fix(gsheets): correctly format Date-column filter literals [superset]

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

   ### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
   
   
   |  Name | Link |
   |:-:|------------------------|
   |<span aria-hidden="true">🔨</span> Latest commit | 1872c59e9a33ca657aa2bad21fd02447ea8a6579 |
   |<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a874bd343cea1000855acd3 |
   |<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-43355--superset-docs-preview.netlify.app](https://deploy-preview-43355--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.eyJ1cmwiOiJodHRwczovL2RlcGxveS1wcmV2aWV3LTQzMzU1LS1zdXBlcnNldC1kb2NzLXByZXZpZXcubmV0bGlmeS5hcHAifQ.A8DNkUEnXS6mmkioaMPm0DsLlFS-gqbVFmV-dHsbKco)<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#DcvLDcIwDADQXXzGUlDaUrEBY7ixSyLlp8StQIjdm9u7vB_UVlJVeALcYGuUnR_ewwff3YtoRyYVdCUeKWNtcoZydEwlq8c9RJU2IkuN5fviURdaH9PGdrJO6G6MWeeZHFv4Xw) |
   ---
   <!-- [superset-docs-preview Preview](https://deploy-preview-43355--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] fix(gsheets): correctly format Date-column filter literals [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/43355?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 `50.00000%` with `4 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 57.29%. Comparing base ([`c2d653b`](https://app.codecov.io/gh/apache/superset/commit/c2d653b4b8051e0d3e51c42b0304db71aafb31c7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`d5628d8`](https://app.codecov.io/gh/apache/superset/commit/d5628d883f9805cea8173996af699ea9321da305?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/43355?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/db\_engine\_specs/gsheets.py](https://app.codecov.io/gh/apache/superset/pull/43355?src=pr&el=tree&filepath=superset%2Fdb_engine_specs%2Fgsheets.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQvZGJfZW5naW5lX3NwZWNzL2dzaGVldHMucHk=) | 50.00% | [4 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/43355?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 (c2d653b) and HEAD (d5628d8). Click for more details.
   > 
   > <details><summary>HEAD has 40 uploads less than BASE</summary>
   >
   >| Flag | BASE (c2d653b) | HEAD (d5628d8) |
   >|------|------|------|
   >|python|36|1|
   >|presto|6|1|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@            Coverage Diff             @@
   ##           master   #43355      +/-   ##
   ==========================================
   - Coverage   66.73%   57.29%   -9.44%     
   ==========================================
     Files        2876     2876              
     Lines      164201   164225      +24     
     Branches    37887    37891       +4     
   ==========================================
   - Hits       109580    94094   -15486     
   - Misses      52465    69237   +16772     
   + Partials     2156      894    -1262     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/43355/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/43355/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/43355/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/43355/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/43355/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.04% <50.00%> (-0.01%)` | :arrow_down: |
   | [python](https://app.codecov.io/gh/apache/superset/pull/43355/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.04% <50.00%> (-19.15%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/43355/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/43355/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/43355?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] fix(gsheets): correctly format Date-column filter literals [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #43355:
URL: https://github.com/apache/superset/pull/43355


-- 
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