Skip to content

fix: Correct scalar validity for null timestamps and empty lists - #423

Draft
Kayvan-Zahiri wants to merge 1 commit into
cloudquery:mainfrom
Kayvan-Zahiri:codex/fix-scalar-validity-resets
Draft

Kayvan-Zahiri wants to merge 1 commit into
cloudquery:mainfrom
Kayvan-Zahiri:codex/fix-scalar-validity-resets

Conversation

@Kayvan-Zahiri

Copy link
Copy Markdown

Scalar validity depends on assignment history in two cases. After a valid timestamp, Timestamp.set(None) leaves the scalar valid and still prints the timestamp. Conversely, assigning an empty list or tuple to a fresh List leaves it invalid and prints null; it prints [] when a nonempty list was assigned first.

Invalidate Timestamp on None, matching numeric and date scalar behavior. Mark a successfully constructed List vector valid after its elements have been processed, including when there are no elements. Eight public-API regression cases cover accepted timestamp input types, null resets and reuse, empty list/tuple inputs, and both fresh and previously populated lists.

These changes concern the validity flag and string representation. They preserve the SDK's existing stored-value behavior and do not change Arrow serialization or the behavior of other scalar types.

Validation using the unchanged uv.lock and Python 3.14.0 (matching CI's Python minor version):

  • A separate baseline checkout with the new tests has eight failures and ten passing controls/existing tests.
  • 86 SDK tests pass after the fix. The Docker image-packaging test is deselected because the Docker build environment was not exercised locally; local gRPC fixtures ran successfully.
  • Black 26.3.1 passes for the full repository. The initial make wrapper attempted an unnecessary dependency refresh under restricted networking; the installed locked Black executable completed the actual check.
  • Source distribution and wheel build successfully with the installed declared Setuptools backend (no build isolation or network needed).
  • git diff --check passes. No dependencies, lockfile, release configuration or versions are changed.

Earlier focused tests on Python 3.12 also passed all 41 scalar cases. No live cloud services or customer data were used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant