Keep field name for csv timestamp column (don't implicitly convert)#8440
Keep field name for csv timestamp column (don't implicitly convert)#8440stephanie-engel merged 1 commit intomasterfrom
Conversation
There was a problem hiding this comment.
Hey @stephanie-engel, nice work! However, I think we also have to handle the cases where the column-type is given explicitly. This is the section above your change. How about handling both cases by adding
if fieldName == p.TimestampColumn {
 recordFields[fieldName] = value
continue
}
directly before line 208
if len(p.ColumnTypes) > 0 {
This way you can leave the lines 241--250 unchanged.
6bcdfdb to
3daf53a
Compare
Thanks for the great feedback, @srebhan ! I just went ahead and made the changes you requested. I confirmed that the timestamp is still parsed correctly and the unit tests still pass 😄 |
ssoroka
left a comment
There was a problem hiding this comment.
Looks great, congratulations. 🥇
(cherry picked from commit 247230c)
Required for all PRs:
Root Cause Analysis:
Within the csv parser, the field name for the
csv_timestamp_columnis, initially, converted from astringinto anint. This causes the field name (for example:202011131605) to be interpreted as a Unix format (instead of the Go reference time200601021504).The Fix:
parseTimestampcan correctly parse the time as unix or UTCTimestampFormat: "200601021504"closes #7288