Skip to content

Commit 6f5d95c

Browse files
committed
[SPARK-8199] fixed year interval
1 parent d9f8ac3 commit 6f5d95c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeFunctions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ case class Year(child: Expression) extends DateFormatExpression {
163163

164164
override def eval(input: InternalRow): Any = {
165165
eval(input, (dayInYear, year, longTime) =>
166-
if (dayInYear > 1 && dayInYear < 360) {
166+
if (dayInYear > 3 && dayInYear < 363) {
167167
year
168168
} else {
169169
val c = Calendar.getInstance()

0 commit comments

Comments
 (0)