(dt *arrow.TimestampType, arr *array.Timestamp)
| 146 | } |
| 147 | |
| 148 | func transformTimestamp(dt *arrow.TimestampType, arr *array.Timestamp) arrow.Array { |
| 149 | builder := array.NewTimestampBuilder(memory.DefaultAllocator, dt) |
| 150 | in, out := arr.DataType().(*arrow.TimestampType).Unit, dt.Unit |
| 151 | |
| 152 | for i := 0; i < arr.Len(); i++ { |
| 153 | if arr.IsNull(i) { |
| 154 | builder.AppendNull() |
| 155 | continue |
| 156 | } |
| 157 | |
| 158 | builder.Append(arrow.Timestamp(arrow.ConvertTimestampValue(in, out, int64(arr.Value(i))))) |
| 159 | } |
| 160 | |
| 161 | return builder.NewArray() |
| 162 | } |
| 163 | |
| 164 | func transformDate32ToTimestamp(arr *array.Date32) arrow.Array { |
| 165 | builder := array.NewTimestampBuilder(memory.DefaultAllocator, &arrow.TimestampType{Unit: arrow.Microsecond, TimeZone: "UTC"}) |
no test coverage detected