Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix null types
  • Loading branch information
Patrick Woody committed Mar 29, 2018
commit 5c95cef81257185205c7ecebe3353060780b2c52
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,10 @@ private[columnar] final class ObjectColumnStats(dataType: DataType) extends Colu
protected var lower: Any = null

val columnType = ColumnType(dataType)
val ordering = if (RowOrdering.isOrderable(dataType)) {
Option(TypeUtils.getInterpretedOrdering(dataType))
} else {
None
val ordering = dataType match {
case x if RowOrdering.isOrderable(dataType) && x != NullType =>
Option(TypeUtils.getInterpretedOrdering(x))
case _ => None
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this class is only for "orderable", maybe we don't need optional here and ordering can just be Ordering[T].

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for DataTypes that could be orderable since Arrays and Structs may have children data types that aren't.

}

override def gatherStats(row: InternalRow, ordinal: Int): Unit = {
Expand Down