Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REST Service - Convert Tweet ID to String #82

Closed
kev007 opened this issue May 18, 2016 · 3 comments
Closed

REST Service - Convert Tweet ID to String #82

kev007 opened this issue May 18, 2016 · 3 comments
Assignees
Labels

Comments

@kev007
Copy link
Contributor

kev007 commented May 18, 2016

JavaScript number type (double-precision) only has about 15 digits of precision. Javascript rounds any extra digits! Since a Tweet ID has 18 digits, the ID is rounded (very, very bad)

Example:
id: 732822797798539264
turns to:
id: 732822797798539300

The REST service should use the id_str field or convert the id to a string:
id: "732822797798539264"

...
So much time was wasted debugging this.

I now hate javascript.

@kev007 kev007 changed the title Convert Tweet ID to String REST Service - Convert Tweet ID to String May 18, 2016
@kev007
Copy link
Contributor Author

kev007 commented May 18, 2016

This is also why some tweets were missing from the map. The chance that tweets had similar IDs was high since IDs are assigned sequentially. Tweets with similar timestamps have similar IDs, therefore collisions occurred when they were rounded.

@martingrimmer
Copy link
Contributor

martingrimmer commented May 19, 2016

Lets use the id_str field. I will change the ExtractIterator in this way.

@martingrimmer
Copy link
Contributor

ill do it

martingrimmer pushed a commit that referenced this issue May 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants