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

feat: define how TIME data is formatted #7674

Merged
merged 8 commits into from
Jun 16, 2021

Conversation

jzaralim
Copy link
Contributor

Description

Updates the TimeLiteral class and define TIME expressions to be formatted as HH:mm:ss

Testing done

Updated unit tests

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@jzaralim jzaralim requested a review from a team as a code owner June 14, 2021 23:57
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;

/**
* Helpers for working with Sql {@code TIMESTAMP}.
* Helpers for working with SQL time types.
*/
public final class SqlTimestamps {
Copy link
Member

Choose a reason for hiding this comment

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

If this also work with other time types, should we rename the class to reflect that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah. I was planning to do this in another PR, so that this one would not have so many files (this class gets referenced several times throughout the codebase)

Comment on lines 1152 to 1154
@Test
public void shouldThrowOnTimeLiteral() {
// When:
Copy link
Member

Choose a reason for hiding this comment

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

Are there any positive tests we can have in this class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a test

Comment on lines 1061 to 1063
@Test
public void shouldThrowOnTimeLiteral() {
// When:
Copy link
Member

Choose a reason for hiding this comment

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

Are there any positive tests we can have in this class?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a test

Copy link
Member

Choose a reason for hiding this comment

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

Did you forget to push the changes? I don't see the test added

Copy link
Contributor Author

Choose a reason for hiding this comment

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

whoops, pushed the changes 😬

Copy link
Member

@spena spena left a comment

Choose a reason for hiding this comment

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

LGTM

@jzaralim jzaralim merged commit 7718955 into confluentinc:master Jun 16, 2021
@jzaralim jzaralim deleted the date-time-literals branch June 16, 2021 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants