合并两个配置单元 table(不同的列大小)- pyspark

Merge two hive table(Different column size)- pyspark

我有一个配置单元table 姓名、联系方式、地址、主题

Name  Contact   Address  Subject
abc   1111      Mumbai    maths
egf   2222      nashik    science
pqr   3333      delhi     history

And other table with schema **Name ,Contact** 
Name   Contact
xyz    4444  
mno    2222 

预期输出

Name  Contact   Address  Subject
abc   1111      Mumbai    maths
pqr   3333      delhi     history
xyz   4444      null      null
mno   2222      nashik    science

我试过连接操作但无法获得正确的输出

使用完全连接:

select coalesce(t2.name,t1.name) as name, 
       coalesce(t2.contact, t1.contact) as contact,
       t1.address, t1.subject
  from table1 t1
       full join table2 t2
                 on t1.contact=t2.contact