cloud-fan commented on a change in pull request #30412:
URL: https://github.com/apache/spark/pull/30412#discussion_r529618309



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -94,6 +94,10 @@ trait CheckAnalysis extends PredicateHelper {
 
       case p if p.analyzed => // Skip already analyzed sub-plans
 
+      case leaf: LeafNode if 
leaf.output.map(_.dataType).exists(CharVarcharUtils.hasCharVarchar) =>

Review comment:
       @maropu I changed it back as it's pretty risky to get output from 
arbitrary logical plans. An example of the error:
   ```
   Caused by: sbt.ForkMain$ForkError: java.lang.AssertionError: assertion 
failed: Scalar subquery should have only one column
        at scala.Predef$.assert(Predef.scala:223)
        at 
org.apache.spark.sql.catalyst.expressions.ScalarSubquery.dataType(subquery.scala:229)
        at 
org.apache.spark.sql.catalyst.expressions.Alias.toAttribute(namedExpressions.scala:181)
        at 
org.apache.spark.sql.catalyst.plans.logical.Project.$anonfun$output$1(basicLogicalOperators.scala:61)
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to