Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mgaido91 committed Oct 30, 2018
1 parent 0d334e3 commit 0e49e91
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,7 @@ class AnalysisSuite extends AnalysisTest with Matchers {
object ViewAnalyzer extends RuleExecutor[LogicalPlan] {
val batches = Batch("View", Once, AliasViewChild(conf), EliminateView) :: Nil
}
def intNotNullableAttr(name: String): Attribute = {
AttributeReference(name, IntegerType, nullable = false)()
}
val relation = LocalRelation(intNotNullableAttr("a"), 'b.string)
val relation = LocalRelation('a.int.notNull, 'b.string)
val view = View(CatalogTable(
identifier = TableIdentifier("v1"),
tableType = CatalogTableType.VIEW,
Expand All @@ -624,7 +621,7 @@ class AnalysisSuite extends AnalysisTest with Matchers {
child = relation)
val tz = Option(conf.sessionLocalTimeZone)
val expected = Project(Seq(
Alias(Cast(intNotNullableAttr("a"), IntegerType, tz), "a")(),
Alias(Cast('a.int.notNull, IntegerType, tz), "a")(),
Alias(Cast('b.string, StringType, tz), "b")()),
relation)
val res = ViewAnalyzer.execute(view)
Expand Down

0 comments on commit 0e49e91

Please sign in to comment.