-
Notifications
You must be signed in to change notification settings - Fork 116
Add CoveringIndexTrait and CoveringIndexConfigTrait #516
Conversation
| val schema: StructType | ||
| val includedColumns: Seq[String] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I would rather not use val in traits unless there is a specific reason.
Refs:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll address your comments in the next PR.
|
|
||
| override def statistics(extended: Boolean = false): Map[String, String] = { | ||
| simpleStatistics ++ (if (extended) extendedStatistics else Map.empty) | ||
| protected def copyIndex( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: override
| override def canHandleDeletedFiles: Boolean = hasLineageColumn | ||
|
|
||
| override def write(ctx: IndexerContext, indexData: DataFrame): Unit = { | ||
| protected def write(ctx: IndexerContext, indexData: DataFrame, mode: SaveMode): Unit = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: override
| sortColumnNames = indexedColumns)) | ||
|
|
||
| private def simpleStatistics: Map[String, String] = { | ||
| protected def simpleStatistics: Map[String, String] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: override
| } | ||
|
|
||
| private def extendedStatistics: Map[String, String] = { | ||
| protected def extendedStatistics: Map[String, String] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: override
What is the context for this pull request?
What changes were proposed in this pull request?
CoveringIndex refactoring to support other covering index type - ZOrderCoveringIndex (#495)
Added CoveringIndexTrait & CoveringIndexConfigTrait to reduce duplicate code.
Does this PR introduce any user-facing change?
No
How was this patch tested?
Refactoring change - tested by existing tests