Skip to content

Commit

Permalink
Fix function
Browse files Browse the repository at this point in the history
  • Loading branch information
acvictor committed Feb 15, 2024
1 parent 3d657ea commit 2f94c82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion velox/functions/sparksql/DateTimeFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ struct WeekdayFunction {

// 0 = Monday, 1 = Tuesday, ..., 6 = Sunday
FOLLY_ALWAYS_INLINE int32_t getWeekday(const std::tm& time) {
return (time.tm_wday - 6) % 7;
return (time.tm_wday + 6) % 7;
}

FOLLY_ALWAYS_INLINE void call(int32_t& result, const arg_type<Date>& date) {
Expand Down

0 comments on commit 2f94c82

Please sign in to comment.