title: Unable to find encoder for Decimal type stored in a DataSet
body: <p>Folks-</p>
  
  <p>I am a complete Spark newb and have been trying to get the code below to work in <code>spark-shell</code> for the past day. I took the time to review the docs and tried to Google the problem but, I am running out of ideas.</p>
  
  <p>Below is the code:</p>
  
  <pre><code>import spark.implicits._
  val opts = Map(
      "url" -&gt; "jdbc:netezza://netezza:5480/test_schema",
      "user" -&gt; "user",
      "password" -&gt; "password",
      "dbtable" -&gt; "test_messages",
      "numPartitions" -&gt; "48"
  )
  
  val sqlContext = new org.apache.spark.sql.SQLContext(sc)
  
  val site = sqlContext
    .read()
    .format("com.ibm.spark.netezza")
    .options(opts)
    .load()
    .select("az","range","time")
    .where("id == 34000007")
  </code></pre>
  
  <p><code>site.printSchema()</code> illustrates all columns are of type <code>decimal</code></p>
  
  <pre><code>val calcs = ama.agg(
      min("az"), (max("az")-min("az")).divide(100),
      min("range"), (max("range")-min("range")).divide(100),
      min("time"), (max("time")-min("time")).divide(100)
  ).collect()(0)
  </code></pre>
  
  <p><code>calcs.printSchema()</code> illustrates all columns are of type <code>decimal</code></p>
  
  <p>Everything works as expected until this line. I thought that by <code>import spark.implicits._</code> this would give me access to the <code>Encoder</code> that was required but, that is not the case.</p>
  
  <pre><code>val newSite = site.map( r =&gt; r.getDecimal(0).subtract(calcs.getDecimal(0)) )
  </code></pre>
  
  <p>Every post that I have reviewed talks about importing <code>implicits</code> but, this has not helped.  I am using Spark 2.0.2. </p>
  
  <p>Any ideas would be greatly appreciated.</p>