File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -151,10 +151,8 @@ case class SortPrefix(child: SortOrder) extends UnaryExpression {
151151 private lazy val calcPrefix : Any => Long = child.child.dataType match {
152152 case BooleanType => (raw) =>
153153 if (raw.asInstanceOf [Boolean ]) 1 else 0
154- case _ : IntegralType => (raw) =>
154+ case DateType | TimestampType | _ : IntegralType => (raw) =>
155155 raw.asInstanceOf [java.lang.Number ].longValue()
156- case DateType | TimestampType =>
157- _.asInstanceOf [java.lang.Number ].longValue()
158156 case FloatType | DoubleType => (raw) => {
159157 val dVal = raw.asInstanceOf [java.lang.Number ].doubleValue()
160158 DoublePrefixComparator .computePrefix(dVal)
You can’t perform that action at this time.
0 commit comments