Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: timestamp precision in insert_rows#393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tswast merged 3 commits intogoogleapis:masterfromMaxxleLLC:bigquery_issue_392
Nov 23, 2020

Conversation

@HemangChothani
Copy link
Contributor

Fixes#392

@HemangChothaniHemangChothani requested review froma team andtswastNovember 19, 2020 07:51
@google-clagoogle-clabot added the cla: yesThis human has signed the Contributor License Agreement. labelNov 19, 2020
@product-auto-labelproduct-auto-labelbot added the api: bigqueryIssues related to the googleapis/python-bigquery API. labelNov 19, 2020
Copy link
Contributor

@tswasttswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please add a system test for this. It'll need to query the table that rows are inserted into in order to ensure the values roundtrip correctly.

@tswast
Copy link
Contributor

As my explorations showed in#392 (comment), we can format the date usingYYYY-MM-DDTHH:MM:SS.MMMMMMZ instead of doing any sort of conversion to floating point.


when=datetime.datetime(2016,12,20,15,58,27,339328)
self.assertEqual(self._call_fut(when),_microseconds_from_datetime(when)/1e6)
self.assertEqual(self._call_fut(when),when.strftime(_RFC3339_MICROS))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please update these tests to compare against the actual string produced. I trust thatwhen.strftime(_RFC3339_MICROS) is doing the right thing, but I'd be much more comfortable seeing the actual formatted string here and in the other unit tests.

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

Reviewers

@tswasttswasttswast approved these changes

Assignees

No one assigned

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Timestamp loss of precision in insert_rows

2 participants

@HemangChothani@tswast

[8]ページ先頭

©2009-2025 Movatter.jp