title: Spark Streaming 2.3.1 Type Casting: String to Timestamp
body: <p>I am using apsche spark streaming 2.3.1, where I am receiving a stream containing a timestamp values (13:09:05.761237147) of the format "HH:mm:ss.xxxxxxxxx" as string.</p>
  
  <p>I am in need to cast this string to timestamp data type.</p>
  
  <pre><code>spark = SparkSession \
      .builder \
      .appName("abc") \
      .getOrCreate()
  
  schema = StructType().add("timestamp", "string").add("object", "string").add("score", "double")
  
  lines = spark \
      .readStream \
      .option("sep", ",") \
      .schema(schema) \
      .csv("/path/to/folder/")
  </code></pre>
  
  <p>Any suggestion how to convert "timestamp" to timestamp data type?</p>