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

[PR] test(cratedb): cover epoch-ms timestamp decoding against a real instance [superset]

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

   ### SUMMARY
   #44720 fixed `CrateEngineSpec.fetch_data` to decode TIMESTAMP columns via `cursor._result["col_types"]`, working around the fact that crate-python's DBAPI `cursor.description` always reports `type_code=None` (confirmed directly by reading `crate.client.cursor.Cursor.description`: it hardcodes `None` for every description slot except the column name). The only coverage that landed with that fix was unit tests mocking `cursor._result` directly — which would never notice if a future crate-python release renamed or restructured that private attribute, since the mock would keep "working" regardless of what the real driver actually does.
   
   This adds a testcontainers case that creates a real table with both `TIMESTAMP WITHOUT TIME ZONE` and `TIMESTAMP WITH TIME ZONE` columns (type codes 15 and 11 respectively, per `crate.client.converter.DataType` — confirmed against the installed `crate` package), inserts epoch-millisecond values, and runs `fetch_data` against the real raw DBAPI cursor from a live query, asserting both decode to the correct `datetime`.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A — test-only change.
   
   ### TESTING INSTRUCTIONS
   CI's `Testcontainers` workflow runs this against a real `crate/crate` container (amd64-only, so it won't run under Docker-on-Apple-Silicon locally — see the file's own docstring). To run manually on an x86_64 host with Docker:
   ```bash
   pytest tests/testcontainers/db_engine_specs/test_crate.py -m testcontainers -v
   ```
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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] test(cratedb): cover epoch-ms timestamp decoding against a real instance [superset]

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


-- 
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] test(cratedb): cover epoch-ms timestamp decoding against a real instance [superset]

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

   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] test(cratedb): cover epoch-ms timestamp decoding against a real instance [superset]

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

   ## [Codecov](https://app.codecov.io/gh/apache/superset/pull/44904?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 66.09%. Comparing base ([`bc3698b`](https://app.codecov.io/gh/apache/superset/commit/bc3698b5d64b973d249d59f584a8dc3c48c83263?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`c0d1dc5`](https://app.codecov.io/gh/apache/superset/commit/c0d1dc51451ae63d40310e332009aad90c8fd238?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff             @@
   ##           master   #44904       +/-   ##
   ===========================================
   - Coverage   82.22%   66.09%   -16.13%     
   ===========================================
     Files        2995     2995               
     Lines      184993   184993               
     Branches    42818    42818               
   ===========================================
   - Hits       152107   122271    -29836     
   - Misses      30127    60040    +29913     
   + Partials     2759     2682       -77     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/superset/pull/44904/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/44904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.30% <ø> (ø)` | |
   | [mysql](https://app.codecov.io/gh/apache/superset/pull/44904/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/44904/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/44904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `38.18% <ø> (ø)` | |
   | [python](https://app.codecov.io/gh/apache/superset/pull/44904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.20% <ø> (-30.93%)` | :arrow_down: |
   | [sqlite](https://app.codecov.io/gh/apache/superset/pull/44904/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.07% <ø> (ø)` | |
   | [unit](https://app.codecov.io/gh/apache/superset/pull/44904/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/44904?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