Timestamp Returned In Scientific Notation By API Crashes Field Cast
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start in google/cloud/bigquery/_helpers.py around line 264 and reproduce loading a timestamp returned in scientific notation. Confirm the BigQuery client can load the value without raising a TypeError while preserving the expected timestamp behavior.
Written by the indexing model from the issue text.
Description
Determine this is the right repository
- I determined this is the correct repository in which to report this bug.
Summary of the issue
Context
Write a timestamp field to the BigQuery API that was written using UnixTime stamp from python.
Then try to load it as an object.
Expected Behavior:
Timestamp comes back without errors.
Actual Behavior:
Getting a TypeError when int tries to parse "1.67899e8".
API client name and version
google-cloud-bigquery
Reproduction steps: code
See: google-cloud-bigquery/google/cloud/bigquery/_helpers.py#L264
Line 264 is: return _datetime_from_microseconds(int(value))
The int cast causes the error when the API returns '1.345345e8', which it does.
Reproduction steps: supporting files
Write a timestamp to bigqurry using time.time()... its accepted.
Load the value back.... causes error.
Reproduction steps: actual results
Reproduction steps: expected results
### OS & version + platform
_No response_
### Python environment
_No response_
### Python dependencies
_No response_
### Additional context
_No response_
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1.8k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 93
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from googleapis/google-cloud-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
googleapis/google-cloud-python#18428 ·
-
priority: p2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/google-cloud-python#18375 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
googleapis/google-cloud-python#18339 ·
-
auth priority: p2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
googleapis/google-cloud-python#18315 ·
-
priority: p2 type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
googleapis/google-cloud-python#18260 ·
All issues in googleapis/google-cloud-python
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100