title: Casting from double to decimal rounds columns in Scala Spark
body: <p>I have a dataframe that looks like this when I print it using <code>df.show()</code>:</p>
  <pre><code>|---id---|----val_dbl----|
  |       1|    1.378332E-7|
  |       2|    2.234551E-7|
  |       3|        4.03E-7|
  |--------|---------------|
  </code></pre>
  <p>with the schema</p>
  <pre><code>df.printSchema()
  |-- id: integer
  |-- val_dbl: double
  </code></pre>
  <p>Then I cast <code>val_dbl</code> to decimal:</p>
  <pre><code>df.withColumn('val_dec', col('val_dbl').cast(DecimalType(18,7))
  </code></pre>
  <p>But then I get this when I print:</p>
  <pre><code>|---id---|----val_dec----|
  |       1|        1.38E-7|
  |       2|        2.23E-7|
  |       3|        4.03E-7|
  |--------|---------------|
  
  |-- id: integer
  |-- val_dec: decimal(18,7)
  </code></pre>
  <p>But it should look like:</p>
  <pre><code>|---id---|----val_dec----|
  |       1|    1.378332E-7|
  |       2|    2.234551E-7|
  |       3|    4.030000E-7|
  |--------|---------------|
  
  |-- id: integer
  |-- val_dec: decimal(18,7)
  </code></pre>
  <p>How come it isn't printing out the full value? Is it actually rounding, or is this just for convenience? And how can I print the full decimal values? I can't imagine it is actually rounding.</p>