You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2018/07/28 05:43:37 UTC

spark git commit: [SPARK-24924][SQL][FOLLOW-UP] Add mapping for built-in Avro data source

Repository: spark
Updated Branches:
  refs/heads/master e8752095a -> c6a3db2fb


[SPARK-24924][SQL][FOLLOW-UP] Add mapping for built-in Avro data source

## What changes were proposed in this pull request?
Add one more test case for `com.databricks.spark.avro`.

## How was this patch tested?
N/A

Author: Xiao Li <ga...@gmail.com>

Closes #21906 from gatorsmile/avro.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c6a3db2f
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c6a3db2f
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c6a3db2f

Branch: refs/heads/master
Commit: c6a3db2fb6d9df1a377a1d3385343f70f9e237e4
Parents: e875209
Author: Xiao Li <ga...@gmail.com>
Authored: Sat Jul 28 13:43:32 2018 +0800
Committer: hyukjinkwon <gu...@apache.org>
Committed: Sat Jul 28 13:43:32 2018 +0800

----------------------------------------------------------------------
 .../src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala  | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/c6a3db2f/external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala
----------------------------------------------------------------------
diff --git a/external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala b/external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala
index 2f478c7..f59c2cc 100644
--- a/external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala
+++ b/external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala
@@ -394,6 +394,13 @@ class AvroSuite extends QueryTest with SharedSQLContext with SQLTestUtils {
     assert(results.length === 8)
   }
 
+  test("old avro data source name works") {
+    val results =
+      spark.read.format("com.databricks.spark.avro")
+        .load(episodesAvro).select("title").collect()
+    assert(results.length === 8)
+  }
+
   test("support of various data types") {
     // This test uses data from test.avro. You can see the data and the schema of this file in
     // test.json and test.avsc


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org