Skip to content

Commit b28d04c

Browse files
rebase velox to main_rebase_557f6d8610
1 parent f7c7e66 commit b28d04c

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

velox/functions/sparksql/DateTime.h

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "velox/external/date/tz.h"
2020
#include "velox/functions/Macros.h"
2121
#include "velox/functions/lib/DateTimeFormatter.h"
22-
#include "velox/functions/lib/JodaDateTime.h"
2322
#include "velox/functions/prestosql/DateTimeImpl.h"
2423
#include "velox/functions/prestosql/types/TimestampWithTimeZoneType.h"
2524
#include "velox/type/Type.h"
@@ -144,22 +143,19 @@ struct YearFunction : public InitSessionTimezone<T>,
144143
}
145144

146145
template <typename TInput>
147-
FOLLY_ALWAYS_INLINE
148-
void call(
146+
FOLLY_ALWAYS_INLINE void call(
149147
TInput& result,
150148
const arg_type<Timestamp>& timestamp) {
151149
result = getYear(getDateTime(timestamp, this->timeZone_));
152150
}
153151

154152
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) {
157154
result = getYear(getDateTime(date));
158155
}
159156

160157
template <typename TInput>
161-
FOLLY_ALWAYS_INLINE
162-
void call(
158+
FOLLY_ALWAYS_INLINE void call(
163159
TInput& result,
164160
const arg_type<TimestampWithTimezone>& timestampWithTimezone) {
165161
auto timestamp = this->toTimestamp(timestampWithTimezone);
@@ -239,7 +235,6 @@ struct DayFunction : public InitSessionTimezone<T>,
239235
result = getDateTime(timestamp, this->timeZone_).tm_mday;
240236
}
241237

242-
243238
template <typename TInput>
244239
FOLLY_ALWAYS_INLINE void call(TInput& result, const arg_type<Date>& date) {
245240
result = getDateTime(date).tm_mday;
@@ -312,10 +307,8 @@ struct DayOfYearFunction : public InitSessionTimezone<T>,
312307
auto timestamp = this->toTimestamp(timestampWithTimezone);
313308
result = getDayOfYear(getDateTime(timestamp, nullptr));
314309
}
315-
316310
};
317311

318-
319312
template <typename T>
320313
struct YearOfWeekFunction : public InitSessionTimezone<T>,
321314
public TimestampWithTimezoneSupport<T> {
@@ -363,7 +356,6 @@ struct YearOfWeekFunction : public InitSessionTimezone<T>,
363356
}
364357
};
365358

366-
367359
template <typename T>
368360
struct HourFunction : public InitSessionTimezone<T>,
369361
public TimestampWithTimezoneSupport<T> {

0 commit comments

Comments
 (0)