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

Add to_iso8601(Timestamp) Presto function #8551

Closed
wants to merge 4 commits into from

Conversation

svm1
Copy link
Collaborator

@svm1 svm1 commented Jan 26, 2024

No description provided.

Copy link

netlify bot commented Jan 26, 2024

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 237f519
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/6618767ed07a7e000822734a

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 26, 2024
@svm1 svm1 changed the title to_iso_from_timestamp to_iso8601_from_timestamp Jan 26, 2024
@majetideepak majetideepak changed the title to_iso8601_from_timestamp Add support for Presto function to_iso8601 for Timestamp type Jan 26, 2024
@majetideepak majetideepak changed the title Add support for Presto function to_iso8601 for Timestamp type Add Presto function to_iso8601 for Timestamp type Jan 26, 2024
@majetideepak
Copy link
Collaborator

Also, we need to update the documentation.

@majetideepak
Copy link
Collaborator

And please verify the results with Prestissimo as well. We will add E2E tests after this lands in Velox.

@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from d56ac02 to 178c7f3 Compare February 14, 2024 02:52
@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from d4c480d to 12de362 Compare February 24, 2024 04:34
@svm1 svm1 marked this pull request as ready for review February 24, 2024 04:35
@svm1
Copy link
Collaborator Author

svm1 commented Feb 24, 2024

@majetideepak @aditi-pandit all changes have been finalized, please take a look. Modified tests to use direct Timestamp values to validate truncation of millisecond. Leveraged date library to format ISO string with the appropriate session timezone offset, to match Presto Java's functionality with JodaTime.

Edit - I noticed a silly error in regard to my millisecond truncation and its validation (confusion between Timestamp's input nanoseconds and output string's milliseconds), currently addressing this. Will correct and re-inform when it is ready for review.

@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from 12de362 to 9531e75 Compare February 24, 2024 04:40
@svm1
Copy link
Collaborator Author

svm1 commented Feb 28, 2024

Fixed the rounding issue by modifying the Timestamp stringify function tmToString(), to have it round up when precision is lowered.

@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from c9b4a61 to 66c14b8 Compare February 28, 2024 08:19
@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from 66c14b8 to 82aecc5 Compare February 29, 2024 04:36
Copy link
Collaborator

@czentgr czentgr left a comment

Choose a reason for hiding this comment

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

Thank you for the function. A few comments.

@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from 82aecc5 to 8404d66 Compare March 5, 2024 02:07
@svm1 svm1 changed the title Add Presto function to_iso8601 for Timestamp type Add to_iso8601(Timestamp) Presto function Mar 5, 2024
@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from 8404d66 to 33147b2 Compare March 8, 2024 01:42
@svm1
Copy link
Collaborator Author

svm1 commented Mar 8, 2024

@majetideepak would appreciate if you could re-review!

@svm1 svm1 force-pushed the svm_to_iso_from_timestamp branch from 33147b2 to 6e941b0 Compare April 11, 2024 22:37
Copy link

stale bot commented Jul 12, 2024

This pull request has been automatically marked as stale because it has not had recent activity. If you'd still like this PR merged, please comment on the PR, make sure you've addressed reviewer comments, and rebase on the latest main. Thank you for your contributions!

@stale stale bot added the stale label Jul 12, 2024
@stale stale bot closed this Jul 26, 2024
@aditi-pandit aditi-pandit reopened this Oct 30, 2024
@stale stale bot removed the stale label Oct 30, 2024
@aditi-pandit
Copy link
Collaborator

@svm1 : Please can you rebase this PR and fix all the conflicts.

@svm1
Copy link
Collaborator Author

svm1 commented Nov 5, 2024

@aditi-pandit This function has actually been implemented already, closing this PR.

@svm1 svm1 closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants