Skip to content

Commit

Permalink
added withTimezone arg to all decoders
Browse files Browse the repository at this point in the history
  • Loading branch information
auden-woolfson committed Oct 24, 2024
1 parent 4bdfcd7 commit 07b1613
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,9 @@ else if (isUuidType(columnDescriptor)) {
}
case INT64: {
if (isTimeStampMicrosType(columnDescriptor) || isTimeMicrosType(columnDescriptor)) {
return new Int64TimeAndTimestampMicrosRLEDictionaryValuesDecoder(bitWidth, inputStream, (LongDictionary) dictionary);
LogicalTypeAnnotation.TimestampLogicalTypeAnnotation typeAnnotation = (LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) columnDescriptor.getPrimitiveType().getLogicalTypeAnnotation();
boolean withTimezone = typeAnnotation.isAdjustedToUTC();
return new Int64TimeAndTimestampMicrosRLEDictionaryValuesDecoder(bitWidth, inputStream, (LongDictionary) dictionary, withTimezone);
}
if (isShortDecimalType(columnDescriptor)) {
return new Int64RLEDictionaryValuesDecoder(bitWidth, inputStream, (LongDictionary) dictionary);
Expand Down Expand Up @@ -231,7 +233,9 @@ else if (isUuidType(columnDescriptor)) {
}
case INT64: {
if (isTimeStampMicrosType(columnDescriptor) || isTimeMicrosType(columnDescriptor)) {
return new Int64TimeAndTimestampMicrosDeltaBinaryPackedValuesDecoder(valueCount, inputStream);
LogicalTypeAnnotation.TimestampLogicalTypeAnnotation typeAnnotation = (LogicalTypeAnnotation.TimestampLogicalTypeAnnotation) columnDescriptor.getPrimitiveType().getLogicalTypeAnnotation();
boolean withTimezone = typeAnnotation.isAdjustedToUTC();
return new Int64TimeAndTimestampMicrosDeltaBinaryPackedValuesDecoder(valueCount, inputStream, withTimezone);
}

if (isShortDecimalType(columnDescriptor)) {
Expand Down

0 comments on commit 07b1613

Please sign in to comment.