|
19 | 19 | #include "velox/external/date/tz.h" |
20 | 20 | #include "velox/functions/Macros.h" |
21 | 21 | #include "velox/functions/lib/DateTimeFormatter.h" |
22 | | -#include "velox/functions/lib/JodaDateTime.h" |
23 | 22 | #include "velox/functions/prestosql/DateTimeImpl.h" |
24 | 23 | #include "velox/functions/prestosql/types/TimestampWithTimeZoneType.h" |
25 | 24 | #include "velox/type/Type.h" |
@@ -144,22 +143,19 @@ struct YearFunction : public InitSessionTimezone<T>, |
144 | 143 | } |
145 | 144 |
|
146 | 145 | template <typename TInput> |
147 | | - FOLLY_ALWAYS_INLINE |
148 | | - void call( |
| 146 | + FOLLY_ALWAYS_INLINE void call( |
149 | 147 | TInput& result, |
150 | 148 | const arg_type<Timestamp>& timestamp) { |
151 | 149 | result = getYear(getDateTime(timestamp, this->timeZone_)); |
152 | 150 | } |
153 | 151 |
|
154 | 152 | template <typename TInput> |
155 | | - FOLLY_ALWAYS_INLINE |
156 | | - void call(TInput& result, const arg_type<Date>& date) { |
| 153 | + FOLLY_ALWAYS_INLINE void call(TInput& result, const arg_type<Date>& date) { |
157 | 154 | result = getYear(getDateTime(date)); |
158 | 155 | } |
159 | 156 |
|
160 | 157 | template <typename TInput> |
161 | | - FOLLY_ALWAYS_INLINE |
162 | | - void call( |
| 158 | + FOLLY_ALWAYS_INLINE void call( |
163 | 159 | TInput& result, |
164 | 160 | const arg_type<TimestampWithTimezone>& timestampWithTimezone) { |
165 | 161 | auto timestamp = this->toTimestamp(timestampWithTimezone); |
@@ -239,7 +235,6 @@ struct DayFunction : public InitSessionTimezone<T>, |
239 | 235 | result = getDateTime(timestamp, this->timeZone_).tm_mday; |
240 | 236 | } |
241 | 237 |
|
242 | | - |
243 | 238 | template <typename TInput> |
244 | 239 | FOLLY_ALWAYS_INLINE void call(TInput& result, const arg_type<Date>& date) { |
245 | 240 | result = getDateTime(date).tm_mday; |
@@ -312,10 +307,8 @@ struct DayOfYearFunction : public InitSessionTimezone<T>, |
312 | 307 | auto timestamp = this->toTimestamp(timestampWithTimezone); |
313 | 308 | result = getDayOfYear(getDateTime(timestamp, nullptr)); |
314 | 309 | } |
315 | | - |
316 | 310 | }; |
317 | 311 |
|
318 | | - |
319 | 312 | template <typename T> |
320 | 313 | struct YearOfWeekFunction : public InitSessionTimezone<T>, |
321 | 314 | public TimestampWithTimezoneSupport<T> { |
@@ -363,7 +356,6 @@ struct YearOfWeekFunction : public InitSessionTimezone<T>, |
363 | 356 | } |
364 | 357 | }; |
365 | 358 |
|
366 | | - |
367 | 359 | template <typename T> |
368 | 360 | struct HourFunction : public InitSessionTimezone<T>, |
369 | 361 | public TimestampWithTimezoneSupport<T> { |
|
0 commit comments