title: What is the purpose of data types in (Py)Spark?
body: <p>PySpark offers various data types, however there does not seem to be any useful method we can call on those types. For example, <a href="https://spark.apache.org/docs/latest/api/python/pyspark.sql.html#pyspark.sql.types.ArrayType" rel="nofollow noreferrer"><code>ArrayType</code> does not even have insert, remove, or find methods</a>.</p>
  
  <p>Why is this lack of methods? What is the purpose of data types in Spark if we can do nothing to them? How does Spark handle those types internally?</p>