Timestamp Returned In Scientific Notation By API Crashes Field Cast
还没有人认领这个 Issue。
评估
调研方向
从 google/cloud/bigquery/_helpers.py 第 264 行附近开始,复现加载以科学计数法返回的时间戳。确认 BigQuery 客户端可以加载该值而不会引发 TypeError,同时保持预期的时间戳行为。
由索引模型根据 Issue 内容生成。
描述
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_
- 主要语言
- Python
- 星标
- 5.4k
- 派生
- 1.8k
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 93
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleapis/google-cloud-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
googleapis/google-cloud-python#18428 ·
-
priority: p2 type: bug
难度 2/5 1-3 小时 新手友好度 72/100
googleapis/google-cloud-python#18375 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 76/100
googleapis/google-cloud-python#18339 ·
-
auth priority: p2
难度 2/5 1-3 小时 新手友好度 88/100
googleapis/google-cloud-python#18315 ·
-
priority: p2 type: bug
难度 2/5 1-3 小时 新手友好度 78/100
googleapis/google-cloud-python#18260 ·
查看 googleapis/google-cloud-python 的全部 Issue
相似的 Issue
-
triage/confirmed
难度 2/5 1-3 小时 新手友好度 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
难度 1/5 1 小时以内 新手友好度 92/100
NousResearch/hermes-agent#118866 ·
-
bug
难度 1/5 1 小时以内 新手友好度 90/100
apache/cloudstack#14222 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
-
bug
难度 2/5 1-3 小时 新手友好度 82/100