Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17770#discussion_r115913359
  
    --- Diff: 
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/AnalysisSuite.scala
 ---
    @@ -441,4 +441,17 @@ class AnalysisSuite extends AnalysisTest with 
ShouldMatchers {
     
         checkAnalysis(SubqueryAlias("tbl", testRelation).as("tbl2"), 
testRelation)
       }
    +
    +  test("analysis barrier") {
    +    // [[AnalysisBarrier]] will be removed after analysis
    +    checkAnalysis(
    +      Project(Seq(UnresolvedAttribute("tbl.a")),
    +        AnalysisBarrier(SubqueryAlias("tbl", testRelation))),
    +      Project(testRelation.output, SubqueryAlias("tbl", testRelation)))
    +
    +    // Make sure we won't resolve the plans wrapped in an 
[[AnalysisBarrier]]
    +    val barrier = 
AnalysisBarrier(Project(Seq(UnresolvedAttribute("tbl.b")),
    +      SubqueryAlias("tbl", testRelation)))
    +    assertAnalysisError(barrier, Seq("cannot resolve '`tbl.b`'"))
    --- End diff --
    
    `CheckAnalysis`.  We wrap an unresolved plan with a barrier. So the 
analyzer won't go through it and it remains unresolved.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to