databricks / spark-avro

Avro Data Source for Apache Spark
http://databricks.com/
Apache License 2.0
539 stars 310 forks source link

Fix java.lang.Double is not valid external type for Decimal(10,10) issue in test AvroWriteBenchmark #250

Closed jinshen-cn closed 7 years ago

jinshen-cn commented 7 years ago

Fix java.lang.Double is not valid external type for Decimal(10,10) issue in test AvroWriteBenchmark

The previous test will throw following exception:

Caused by: java.lang.RuntimeException: java.lang.Double is not a valid external type for schema of decimal(10,10)
    at org.apache.spark.sql.catalyst.expressions.GeneratedClass$SpecificUnsafeProjection.apply(generated.java:288)
    at org.apache.spark.sql.catalyst.encoders.ExpressionEncoder.toRow(ExpressionEncoder.scala:276)
    ... 17 more
codecov-io commented 7 years ago

Codecov Report

Merging #250 into branch-3.2 will not change coverage. The diff coverage is n/a.

@@             Coverage Diff             @@
##           branch-3.2     #250   +/-   ##
===========================================
  Coverage       91.18%   91.18%           
===========================================
  Files               5        5           
  Lines             329      329           
  Branches           51       51           
===========================================
  Hits              300      300           
  Misses             29       29
gengliangwang commented 7 years ago

@CrazyJacky Thanks. Overall this looks good to me except one comment.

jinshen-cn commented 7 years ago

@gengliangwang updated the code to add space after comma. Thanks for reviewing it.

jinshen-cn commented 7 years ago

@gengliangwang thanks for pointing that out. I haven't noticed it. Just made the update.

gengliangwang commented 7 years ago

Thanks, merge to master