Skip to content

Commit 231cb1e

Browse files
committed
Remove specific type for TimestampWithOffsetRunEndsType
1 parent f42417b commit 231cb1e

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

arrow/extensions/timestamp_with_offset.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -145,19 +145,14 @@ func NewTimestampWithOffsetTypeDictionaryEncoded[I DictIndexType](unit arrow.Tim
145145
return v
146146
}
147147

148-
type TimestampWithOffsetRunEndsType interface {
149-
*arrow.Int8Type | *arrow.Int16Type | *arrow.Int32Type | *arrow.Int64Type |
150-
*arrow.Uint8Type | *arrow.Uint16Type | *arrow.Uint32Type | *arrow.Uint64Type
151-
}
152-
153148
// NewTimestampWithOffsetType creates a new TimestampWithOffsetType with the underlying storage type set correctly to
154149
// Struct(timestamp=Timestamp(T, "UTC"), offset_minutes=RunEndEncoded(E, Int16)), where T is any TimeUnit and E is a
155150
// valid run-ends type.
156-
func NewTimestampWithOffsetTypeRunEndEncoded[E TimestampWithOffsetRunEndsType](unit arrow.TimeUnit, runEnds E) *TimestampWithOffsetType {
151+
func NewTimestampWithOffsetTypeRunEndEncoded[E DictIndexType](unit arrow.TimeUnit, runEnds E) *TimestampWithOffsetType {
157152
offsetType := arrow.RunEndEncodedOf(arrow.DataType(runEnds), arrow.PrimitiveTypes.Int16)
158153

159154
v, _ := NewTimestampWithOffsetTypeCustomOffset(unit, offsetType)
160-
// SAFETY: This should never error as TimestampWithOffsetRunEndsType is always a valid run ends type
155+
// SAFETY: This should never error as DictIndexType always a valid run ends type
161156

162157
return v
163158

0 commit comments

Comments
 (0)