File tree 1 file changed +9
-5
lines changed
runtime/vam/expr/function
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -136,13 +136,17 @@ func (s *Strftime) fastPath(fvec *vector.Const, tvec vector.Any) vector.Any {
136
136
}
137
137
138
138
func (s * Strftime ) fastPathLoop (f * strftime.Strftime , vec * vector.Int , index []uint32 ) * vector.String {
139
+ if index != nil {
140
+ out := vector .NewStringEmpty (uint32 (len (index )), vector .NewBoolView (vec .Nulls , index ))
141
+ for _ , i := range index {
142
+ s := f .FormatString (nano .Ts (vec .Values [i ]).Time ())
143
+ out .Append (s )
144
+ }
145
+ return out
146
+ }
139
147
out := vector .NewStringEmpty (vec .Len (), vec .Nulls )
140
148
for i := range vec .Len () {
141
- idx := i
142
- if index != nil {
143
- idx = index [i ]
144
- }
145
- s := f .FormatString (nano .Ts (vec .Values [idx ]).Time ())
149
+ s := f .FormatString (nano .Ts (vec .Values [i ]).Time ())
146
150
out .Append (s )
147
151
}
148
152
return out
You can’t perform that action at this time.
0 commit comments