Skip to content

Commit

Permalink
Do not use TimestampWithTimezoneSupport for Spark's DayOfWeekFunction (
Browse files Browse the repository at this point in the history
…#8303)

Summary:
Remove the Spark Function `DayOfWeekFunction` extends `TimestampWithTimezoneSupport`.

For following reasons:
1. `TimestampWithTimezoneSupport` is `prestosql`'s struct, we should not extends across modules.
2. `TimestampWithTimezoneSupport` not been used in `DayOfWeekFunction`

Pull Request resolved: #8303

Reviewed By: xiaoxmeng

Differential Revision: D52646452

Pulled By: mbasmanova

fbshipit-source-id: a4ad5f792419027d11e07310d971f313aedd0e94
  • Loading branch information
zwangsheng authored and facebook-github-bot committed Jan 10, 2024
1 parent ebefc6a commit 5d47574
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions velox/functions/sparksql/DateTimeFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "velox/functions/lib/DateTimeFormatter.h"
#include "velox/functions/lib/TimeUtils.h"
#include "velox/functions/prestosql/DateTimeImpl.h"
#include "velox/type/tz/TimeZoneMap.h"

namespace facebook::velox::functions::sparksql {
Expand Down Expand Up @@ -299,8 +298,7 @@ struct DateSubFunction {
};

template <typename T>
struct DayOfWeekFunction : public InitSessionTimezone<T>,
public TimestampWithTimezoneSupport<T> {
struct DayOfWeekFunction : public InitSessionTimezone<T> {
VELOX_DEFINE_FUNCTION_TYPES(T);

// 1 = Sunday, 2 = Monday, ..., 7 = Saturday
Expand Down

0 comments on commit 5d47574

Please sign in to comment.