I am using PySpark version 3.01 on DataBricks 7.4.
I am getting this error when trying to do a boxplot (histograms work fine). I have tried manually casting DISTANCE as both as integer and a double, but both fail:
AnalysisException: cannot resolve 'approx_percentile(`DISTANCE`, CAST(0.25BD AS DOUBLE), 100.0BD)' due to data type mismatch: argument 3 requires integral type, however, '100.0BD' is of decimal(4,1) type.; line 1 pos 0;
---------------------------------------------------------------------------
AnalysisException Traceback (most recent call last)
<command-2120656041886569> in <module>
5 hdf.cols["ORIGIN_AIRPORT"].hist(ax=axs[1,0])
6 hdf.cols["DESTINATION_AIRPORT"].hist(ax=axs[1,1])
----> 7 hdf.cols["DISTANCE"].boxplot(ax=axs[2,0])
8 hdf.cols["plannedDepartTime"].boxplot(ax=axs[2,1])
I am using PySpark version 3.01 on DataBricks 7.4.
I am getting this error when trying to do a boxplot (histograms work fine). I have tried manually casting DISTANCE as both as integer and a double, but both fail: