-
Notifications
You must be signed in to change notification settings - Fork 32
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
Refactoring Extended Time #967
Conversation
@@ -11,7 +11,7 @@ import ( | |||
type ExtendedTimeKindType string | |||
|
|||
const ( | |||
TimestampTzKindType ExtendedTimeKindType = "timestamp_tz" | |||
TimestampTZKindType ExtendedTimeKindType = "timestamp_tz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppercase
@@ -28,8 +28,8 @@ var ( | |||
Format: RFC3339NanosecondNoTZ, | |||
} | |||
|
|||
TimestampTz = NestedKind{ | |||
Type: TimestampTzKindType, | |||
TimestampTZ = NestedKind{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppercase
@@ -92,15 +93,6 @@ func NewExtendedTimeDetails(details KindDetails, extendedType ext.ExtendedTimeKi | |||
return details | |||
} | |||
|
|||
func NewKindDetailsFromTemplate(details KindDetails, extendedType ext.ExtendedTimeKindType) KindDetails { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this function
@@ -12,7 +12,7 @@ import ( | |||
type Time struct{} | |||
|
|||
func (Time) ToKindDetails() typing.KindDetails { | |||
return typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimeKindType) | |||
return typing.NewExtendedTimeDetails(typing.ETime, ext.TimeKindType, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this method take a receiver t
and use t.layout()
as the last arg here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can. Maybe as a 2nd pass? We're not passing a layout into the ExtTime
right now.
And if we did, we should be using a ms precision string rather than the default which is microsecond precision
} | ||
{ | ||
// In memory is timestamp_ntz and destination is timestamp_tz | ||
tableData := &TableData{inMemoryColumns: &columns.Columns{}} | ||
kd := typing.NewKindDetailsFromTemplate(typing.ETime, ext.TimestampNTZKindType) | ||
kd := typing.NewExtendedTimeDetails(typing.ETime, ext.TimestampNTZKindType, "") | ||
kd.ExtendedTimeDetails.Format = ext.RFC3339MillisecondNoTZ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be passed into the constructor on the line above, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it can!
NewKindDetailsFromTemplate
TimestampTz