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
update doc about visibility for testing.
  • Loading branch information
petermaxlee committed Aug 17, 2016
commit 2327b7971a845ce01b0b18fd5ccd2b1f0bb99be0
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ object ResolveInlineTables extends Rule[LogicalPlan] {
convert(table)
}

/** Validates that all inline table data are foldable expressions. */
/**
* Validates that all inline table data are foldable expressions.
*
* This is publicly visible for unit testing.
Copy link
Contributor

Choose a reason for hiding this comment

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

The test is located in the same package, so you could reduce visibility to protected/package.

*/
def validateInputFoldable(table: UnresolvedInlineTable): Unit = {
table.rows.foreach { row =>
row.foreach { e =>
Expand All @@ -49,6 +53,8 @@ object ResolveInlineTables extends Rule[LogicalPlan] {
* Validates the input data dimension:
* 1. All rows have the same cardinality.
* 2. The number of column aliases defined is consistent with the number of columns in data.
*
* This is publicly visible for unit testing.
*/
def validateInputDimension(table: UnresolvedInlineTable): Unit = {
if (table.rows.nonEmpty) {
Expand All @@ -70,6 +76,8 @@ object ResolveInlineTables extends Rule[LogicalPlan] {
* into a [[LocalRelation]].
*
* This function attempts to coerce inputs into consistent types.
*
* This is publicly visible for unit testing.
*/
def convert(table: UnresolvedInlineTable): LocalRelation = {
val numCols = table.rows.head.size
Expand Down