它给出了一个错误,因为我把输入,我把int,但我不知道有一个空字段“”,现在我甚至不能选择,我怎么能扭转这个,我试着投,但它不起作用
dfNewRecords = spark.sql("""
cast(a.ped_pca as long) as ped_pca,
cast(a.transporte as long) as transporte,
cast(a.fornecimento as long) as fornecimento,
cast(a.codigo_material as long) as codigo_material,
from df_new a
where
not exists ( select 1 from df_hist b
where
a.numero_nota_fiscal = b.numero_nota_fiscal
and a.centro = b.centro
and b.data_puxada between '{}' and '{}'
and a.codigo_material = b.codigo_material
and a.transporte = b.transporte
and a.cliente = b.cliente
)
and (a.data_puxada <> 'Data Puxada' or a.data_puxada is not null)
order by 5 desc""".format(date_ago,date_after)).repartition(16)
在我添加了输入之后,出现了以下错误:parquet列无法转换。列:[ped\u pca],应为:stringtype,找到:int32
即使在不键入的情况下进行选择,现在也只会出现此错误
暂无答案!
目前还没有任何答案,快来回答吧!