-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-28659][SQL] Use data source if convertible in insert overwrite directory #25398
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 all commits
12d880a
36913da
68db457
b432b39
72d6dd4
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 |
|---|---|---|
|
|
@@ -434,14 +434,13 @@ class InsertSuite extends DataSourceTest with SharedSQLContext { | |
| } | ||
| } | ||
|
|
||
| test("Insert overwrite directory using Hive serde without turning on Hive support") { | ||
| test("Insert overwrite directory in hive table without turning on Hive support") { | ||
| withTempDir { dir => | ||
| val path = dir.toURI.getPath | ||
| val e = intercept[AnalysisException] { | ||
| sql( | ||
| s""" | ||
| |INSERT OVERWRITE LOCAL DIRECTORY '$path' | ||
| |STORED AS orc | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why did you delete this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if we use
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the test case name should be modified correspondingly and a new test case for (orc/parquet) should be added.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @advancedxy i have updated the testcase name and for orc and parquet testcase was already added. As they will be converted to data source, the data in the directory would be compressed. |
||
| |SELECT 1, 2 | ||
| """.stripMargin) | ||
| }.getMessage | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Are you sure this is correct? It seems a valid value is
Some(DDLUtils.HIVE_PROVIDER)orNonefor the third parameter.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.
in case of
parquetandorcwe can use the respective file format instead ofhive.In case of ctas also we convert to use data source https://github.com/viirya/spark-1/blob/839a6ce1732fa37b5f8ec9afa2d51730fc6ca691/sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveStrategies.scala#L188
This will make it inline with that behavior.