Skip to content

DateTime class is too limited for esoteric Data API usage #64

Description

@toptobes

Will let @sl-at-ibm explain further. The following is copied from the internal document:

The wide range of timestamps in Data API are not covered by the DateTime native class. 

Probably calls for a custom data type. 

Error is System.ArgumentOutOfRangeException : Value to add was out of range. (Parameter 'value').

Talk to Stefano for more (incl. repro), and compare here:
(https://docs.datastax.com/en/astra-db-serverless/api-reference/python-client.html#dataapitimestamp-and-datetimes).
When reading a timestamp from a table, below the millisecond level the value differs from what was read (and from what is in Cassandra). 

Could call for a custom data type (currently it's stdlib).

Note from me:

  • This can be handled post-GA by allowing for an opt-in custom "DataAPIDateTime" or "DataAPITimestamp" dataclass (the clients have a precedent of prefixing our custom datatypes with DataAPI*)

Should be handled by @a-random-steve

Metadata

Metadata

Assignees

No one assigned

    Labels

    Effort TBDImpacts-DocsThe progress of this item has implications on Docs

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions