What is going wrong with `unionAll` of Spark `DataFrame`?

前端 未结 5 632
误落风尘
误落风尘 2020-11-29 07:19

Using Spark 1.5.0 and given the following code, I expect unionAll to union DataFrames based on their column name. In the code, I\'m using some FunSuite for pass

5条回答
  •  执念已碎
    2020-11-29 08:00

    no issues/bugs - if you observe your case class B very closely then you will be clear. Case Class A --> you have mentioned the order (a,b), and Case Class B --> you have mentioned the order (b,a) ---> this is expected as per order

    case class A (a: Int, b: Int) case class B (b: Int, a: Int)

    thanks, Subbu

提交回复
热议问题