title: Spark 1.5.2: org.apache.spark.sql.AnalysisException: unresolved operator 'Union;
body: <p>I have two dataframes <code>df1</code> and <code>df2</code>. Both of them have the following schema:</p>
  
  <pre><code> |-- ts: long (nullable = true)
   |-- id: integer (nullable = true)
   |-- managers: array (nullable = true)
   |    |-- element: string (containsNull = true)
   |-- projects: array (nullable = true)
   |    |-- element: string (containsNull = true)
  </code></pre>
  
  <p><code>df1</code> is created from an avro file while <code>df2</code> from an equivalent parquet file. However, If I execute, <code>df1.unionAll(df2).show()</code>, I get the following error:</p>
  
  <pre><code>    org.apache.spark.sql.AnalysisException: unresolved operator 'Union;
      at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$class.failAnalysis(CheckAnalysis.scala:37)
      at org.apache.spark.sql.catalyst.analysis.Analyzer.failAnalysis(Analyzer.scala:44)
      at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$checkAnalysis$1.apply(CheckAnalysis.scala:174)
      at org.apache.spark.sql.catalyst.analysis.CheckAnalysis$$anonfun$checkAnalysis$1.apply(CheckAnalysis.scala:49)
      at org.apache.spark.sql.catalyst.trees.TreeNode.foreachUp(TreeNode.scala:103)
  </code></pre>