-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: time unit try from string (#45)
# Rationale for this change In DDL, a Timestamp column can be instantiated with the following syntax: ```sql TIMESTAMP(6) ``` where 6 represents millisecond precision. It appears that the gateway by default supports only nanosecond precision on DDL, however if this changes in the future, we will need a way to parse the time unit from a DDL message in proofs-service. This PR contains a simple string parser that allows for selection of a supported precision for timestamp columns. # What changes are included in this PR? - [x] Implements TryFrom &str for TimeUnit - [x] updates Display implementation for TImestamp column type to fix a backwards print that is occuring: ``` column type TIMESTAMP(TIMEUNIT: UTC, TIMEZONE: NANOSECONDS (PRECISION: 9)) ``` # Are these changes tested? yes
- Loading branch information
1 parent
b52d19a
commit 54584e5
Showing
3 changed files
with
56 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters