title: inferSchema in spark csv package
body: <p>i am trying to read a csv file as a spark df by enabling inferSchema, but then am unable to get the fv_df.columns. below is the error message </p>
  
  <pre><code>&gt;&gt;&gt; fv_df = spark.read.option("header", "true").option("delimiter", "\t").csv('/home/h212957/FacilityView/datapoints_FV.csv', inferSchema=True)
  &gt;&gt;&gt; fv_df.columns
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File "/home/h212957/spark/python/pyspark/sql/dataframe.py", line 687, in columns
      return [f.name for f in self.schema.fields]
    File "/home/h212957/spark/python/pyspark/sql/dataframe.py", line 227, in schema
      self._schema = _parse_datatype_json_string(self._jdf.schema().json())
    File "/home/h212957/spark/python/pyspark/sql/types.py", line 894, in _parse_datatype_json_string
      return _parse_datatype_json_value(json.loads(json_string))
    File "/home/h212957/spark/python/pyspark/sql/types.py", line 911, in _parse_datatype_json_value
      return _all_complex_types[tpe].fromJson(json_value)
    File "/home/h212957/spark/python/pyspark/sql/types.py", line 562, in fromJson
      return StructType([StructField.fromJson(f) for f in json["fields"]])
    File "/home/h212957/spark/python/pyspark/sql/types.py", line 428, in fromJson
      _parse_datatype_json_value(json["type"]),
    File "/home/h212957/spark/python/pyspark/sql/types.py", line 907, in _parse_datatype_json_value
      raise ValueError("Could not parse datatype: %s" % json_value)
  ValueError: Could not parse datatype: decimal(7,-31)
  </code></pre>
  
  <p>However If i don't infer the Schema than I am able to fetch the columns and do further operations. I am unable to get as why this is working in this way. Can anyone please explain me.</p>