Description
Schema pruning fails for some queries with correlated subqueries.
sql( s"""SELECT name FROM contacts c |WHERE | EXISTS (SELECT 1 FROM ids i WHERE i.value = c.id) | AND | EXISTS (SELECT 1 FROM first_names n WHERE c.name.first = n.value) |""".stripMargin)
[info] org.apache.spark.SparkException: Failed to merge fields 'value' and 'value'. Failed to merge incompatible data types int and string [info] at org.apache.spark.sql.errors.QueryExecutionErrors$.failedMergingFieldsError(QueryExecutionErrors.scala:936)