-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25271][SQL] Hive ctas commands should use data source if it is convertible #22514
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 2 commits
5debc60
1223178
ad620be
1c4ad1a
5780a5e
0b0a900
c5992ae
e6b61c7
e42a846
9629175
e04812d
3c07d74
57fc943
ef52536
15b9c02
d949436
839a6ce
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 |
|---|---|---|
|
|
@@ -34,11 +34,16 @@ import org.apache.spark.sql.types._ | |
| * @param tableDesc the metadata of the table to be created. | ||
| * @param mode the data writing mode | ||
| * @param query an optional logical plan representing data to write into the created table. | ||
| * @param useExternalSerde whether to use external serde to write data, e.g., Hive Serde. Currently | ||
|
||
| * this is only used by Hive. When we are planing `CreateTable`, and a Hive | ||
| * table to be created can be converted to data source table, we set this | ||
| * to false so later we know we can use data source writer to write data. | ||
| */ | ||
| case class CreateTable( | ||
| tableDesc: CatalogTable, | ||
| mode: SaveMode, | ||
| query: Option[LogicalPlan]) extends LogicalPlan { | ||
| query: Option[LogicalPlan], | ||
| useExternalSerde: Boolean = false) extends LogicalPlan { | ||
| assert(tableDesc.provider.isDefined, "The table to be created must have a provider.") | ||
|
|
||
| if (query.isEmpty) { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2648,7 +2648,7 @@ class DataFrameFunctionsSuite extends QueryTest with SharedSQLContext { | |
| "transform_values(" + | ||
| "z,(k, v) -> map_from_arrays(ARRAY(1, 2, 3), " + | ||
| "ARRAY('one', 'two', 'three'))[k] || '_' || CAST(v AS String))"), | ||
| Seq(Row(Map(1 -> "one_1.0", 2 -> "two_1.4", 3 ->"three_1.7")))) | ||
| Seq(Row(Map(1 -> "one_1.0", 2 -> "two_1.4", 3 -> "three_1.7")))) | ||
|
||
|
|
||
| checkAnswer( | ||
| dfExample4.selectExpr("transform_values(z, (k, v) -> k-v)"), | ||
|
|
||
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.
If possible, let's not touch this because we didn't change anything in this file. It would be helpful for backporting. SPARK-25271 is reported as a regression in 2.3.x. I assume that we need to backport this for 2.4.1 and 2.3.3 at least.