title: SparkSQL and UDT
body: <p>I try to use SparkSQL (v.1.3.0) to access a PostgreSQL database. In this database I have a table</p>
  
  <pre><code>CREATE TABLE test (
   id bigint,
   values double precision[]
  );
  </code></pre>
  
  <p>For accessing the table, I use</p>
  
  <pre><code>val sparkConf = new SparkConf().setAppName("TestRead").setMaster("local[2]")
  val sc = new SparkContext(sparkConf)
  val sqlContext = new SQLContext(sc)
  
  val jdbcDF = sqlContext.load("jdbc", Map(
    "url" -&gt; "jdbc:postgresql://...",
    "dbtable" -&gt; "schema.test",
    "user" -&gt; "...",
    "password" -&gt; "..."))
  
  sqlContext.sql("SELECT * FROM schema.test")
  </code></pre>
  
  <p>However, every time I try to access the table containing this array I get a <code>java.sql.SQLException: Unsupported type 2003</code>.</p>
  
  <p>I have found an example within the Spark test code that creates a UDT in Spark for a two-dimensional point (see <a href="https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/test/ExamplePointUDT.scala#L31" rel="nofollow">ExamplePointUDT.scala</a>). However, I do not understand how I could possibly use this code.</p>