-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Kernel] Add support for reading tables with timestamp_ntz
type columns
#2855
Conversation
timestamp_ntz
type columnstimestamp_ntz
type columns
@@ -86,6 +86,9 @@ public long getLong(int rowId) { | |||
} else if (partitionType.equivalent(TimestampType.TIMESTAMP)) { | |||
return InternalUtils.microsSinceEpoch( | |||
Timestamp.valueOf(input.getString(rowId))); | |||
} else if (partitionType.equivalent(TimestampNTZType.TIMESTAMP_NTZ)) { |
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.
minor nit: might be safer to do
else if (partitionType.equivalent(TimestampType.TIMESTAMP) ||
partitionType.equivalent(TimestampNTZType.TIMESTAMP_NTZ))) {
return InternalUtils.microsSinceEpoch(
Timestamp.valueOf(input.getString(rowId)));
}
then one implementation won't accidentally diverge from the other in the future
@@ -77,7 +79,9 @@ public static Converter createConverter( | |||
return DecimalColumnReader.createDecimalConverter( | |||
initialBatchSize, (DecimalType) typeFromClient, typeFromFile); | |||
} else if (typeFromClient instanceof TimestampType) { | |||
return TimestampConverters.createTimestampConverter(initialBatchSize, typeFromFile); |
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.
ditto, but up to you
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.
updated the other one. This one has different method calls depending upon the type.
Close #2279