-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-22972] Couldn't find corresponding Hive SerDe for data source provider org.apache.spark.sql.hive.orc #20165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
fa902d6
cf7cbce
b64ce53
1cfa72f
cc4dd13
3eafdfb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,7 @@ import java.io.File | |
| import org.apache.spark.sql.Row | ||
| import org.apache.spark.sql.execution.datasources.orc.OrcSuite | ||
| import org.apache.spark.sql.hive.test.TestHiveSingleton | ||
| import org.apache.spark.sql.internal.HiveSerDe | ||
| import org.apache.spark.util.Utils | ||
|
|
||
| class HiveOrcSourceSuite extends OrcSuite with TestHiveSingleton { | ||
|
|
@@ -62,6 +63,22 @@ class HiveOrcSourceSuite extends OrcSuite with TestHiveSingleton { | |
| """.stripMargin) | ||
| } | ||
|
|
||
| test("SPARK-22972: hive orc source") { | ||
| spark.sql( | ||
|
||
| s"""CREATE TABLE normal_orc_as_source_hive | ||
|
||
| |USING org.apache.spark.sql.hive.orc | ||
| |OPTIONS ( | ||
| | PATH '${new File(orcTableAsDir.getAbsolutePath).toURI}' | ||
| |) | ||
| """.stripMargin) | ||
|
||
| spark.sql("desc formatted normal_orc_as_source_hive").show() | ||
|
||
| checkAnswer(sql("SELECT COUNT(*) FROM normal_orc_as_source_hive"), Row(10)) | ||
| assert(HiveSerDe.sourceToSerDe("org.apache.spark.sql.hive.orc") | ||
| .equals(HiveSerDe.sourceToSerDe("orc"))) | ||
|
||
| assert(HiveSerDe.sourceToSerDe("org.apache.spark.sql.orc") | ||
| .equals(HiveSerDe.sourceToSerDe("orc"))) | ||
| } | ||
|
|
||
| test("SPARK-19459/SPARK-18220: read char/varchar column written by Hive") { | ||
| val location = Utils.createTempDir() | ||
| val uri = location.toURI | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to keep the original one. We do not want to introduce behavior breaks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok