Skip to content

Conversation

@d80tb7
Copy link
Owner

@d80tb7 d80tb7 commented Feb 7, 2021

WIP

Things I don't like:

  1. We're still calling convertSpecialDate/Timestamp just as much as the previous solution as it's called twice in the parse() methods.
  2. DateFormatter.getPartitioningFormatter and TimestampFormatter.getPartitioningFormatter are duplicating the legacy format stuff in DateFormatter.apply and `TimestampFormatter.apply``` respectively.

First could be solved by extracting the parse logic from e.g. Iso8601DateFormatter into some mthod with a considerSpecial flag. This would come at the cost of the code more difficult to read. E.g. we might need an extra abstract base class.

Second can only be solved if we decide we don't need to support legacy formats, but this would be a breaking change with the previous code.

@github-actions github-actions bot added the SQL label Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants