Hi Rico, you have any code snippet? I have no problem casting int to string.
> 2022年2月17日 上午12:26,Rico Bergmann <i...@ricobergmann.de> 写道: > > Hi! > > I am reading a partitioned dataFrame into spark using automatic type > inference for the partition columns. For one partition column the data > contains an integer, therefor Spark uses IntegerType for this column. In > general this is supposed to be a StringType column. So I tried to cast this > column to StringType. But this fails with AnalysisException “cannot cast int > to string”. > > Is this a bug? Or is it really not allowed to cast an int to a string? > > I’m using Spark 3.1.1 > > Best regards > > Rico. > > --------------------------------------------------------------------- > To unsubscribe e-mail: user-unsubscr...@spark.apache.org > --------------------------------------------------------------------- To unsubscribe e-mail: user-unsubscr...@spark.apache.org