Check out example codes for "spark sql grows beyond 64 kb". It will help you in understanding the concepts better.

Code Example 1

spark = SparkSession.builder.master('local').appName('tow-way')\
        .config('spark.sql.codegen.wholeStage', 'false')\ ## <-- add this line
        .getOrCreate()

Learn ReactJs, React Native from akashmittal.com