Apache spark I';m在加入Spark Dataframe时遇到意外的失败断言错误-发现重复的重写属性
当我运行下面的代码时,得到错误java.lang.AssertionError:assertion failed:Found duplicate rewrite attributes。在更新我们的databricks运行时之前,它运行得很顺利Apache spark I';m在加入Spark Dataframe时遇到意外的失败断言错误-发现重复的重写属性,apache-spark,pyspark,databricks,Apache Spark,Pyspark,Databricks,当我运行下面的代码时,得到错误java.lang.AssertionError:assertion failed:Found duplicate rewrite attributes。在更新我们的databricks运行时之前,它运行得很顺利 top10_df是一个数据帧,在列表组中具有唯一键 res_df是top10_df中具有最小和最大日期的唯一键的集合 创建并持久化res_df后,它将重新加入组中唯一键的前10_df 而不是: out_df=(top10_df.别名('t10'))
组中具有唯一键
out_df = (top10_df.alias('t10')
.join(res_df.alias('res')
.select(fn.col('groups').alias('groups'),
fn.col('min_date_created').alias('min_date_created'),
fn.col('max_date_created').alias('max_date_created')),
groups,'left')
out_df = (top10_df.alias('t10')
.join(res_df.alias('res')
.select(fn.col('groups').alias('groups'),
fn.col('min_date_created').alias('min_date_created'),
fn.col('max_date_created').alias('max_date_created')),
groups,'left')