def is_spark_below_2_2():
import pyspark<EOL>if(hasattr(pyspark,"<STR_LIT:version>")):<EOL><INDENT>full_version = pyspark.version.__version__<EOL>parts = full_version.split("<STR_LIT:.>")<EOL>spark_version = parts[<NUM_LIT:0>] + "<STR_LIT:.>" + parts[<NUM_LIT:1>]<EOL>if(compare_version(spark_version, "<STR_LIT>")>=<NUM_LIT:0>):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
Check if spark version is below 2.2