Skip to content

Follow-up: Harden RunQuery timestamp/date coercion #40

@jwildfire

Description

This Issue was drafted by GitHub Copilot using GPT-5.3-Codex and reviewed by Jeremy Wildfire (@jwildfire)

Task Summary

Track and implement a safe coercion path for timestamp/date parsing in RunQuery() when bUseSchema = TRUE.

Problem / Rationale

A proposed PR update suggested replacing purrr::list_c(parsed) %>% as.POSIXct(...) with an explicit vector conversion via unlist(..., use.names = FALSE) before as.POSIXct(...).

That change was intentionally deferred from PR #39 to keep the release candidate focused. The concern remains valid and should be addressed in a targeted follow-up with explicit regression coverage.

Scope

  • Review current parsing behavior in R/RunQuery.R for schema-based Date/timestamp coercion.
  • Confirm edge cases for list-like parsed values and mixed successful/failed conversions.
  • Implement robust vector coercion before POSIXct conversion if needed.
  • Add/update tests in tests/testthat/test-RunQuery.R for this exact parsing path.

Out of scope:

  • Broader RunQuery refactors unrelated to date/timestamp coercion.
  • API/interface changes to RunQuery().

Proposed Approach (Optional)

  • Reproduce current behavior with representative inputs (character timestamps, invalid strings, NA values).
  • Update conversion to use explicit vector flattening where appropriate.
  • Preserve warning/logging behavior for unparsable values.
  • Validate with focused tests and devtools::check().

QC Approach

In addition to standard QC (e.g., code reviews, automated checks) the following QC measures will be implemented:

[ ] Qualification Test via Double Programming
[x] Unit Tests
[ ] User Tests (e.g. visual comparison)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions